Sha256: a775ed85da4c8c07ea008350aa07dc7f39e1fd678da61f6945b0961c2f348700

Contents?: true

Size: 621 Bytes

Versions: 21

Compression:

Stored size: 621 Bytes

Contents

# encoding: UTF-8

require File.expand_path("helper", File.dirname(__FILE__))

class TestDistributedTransactions < Test::Unit::TestCase

  include Helper::Distributed

  def test_multi_discard
    @foo = nil

    assert_raise Redis::Distributed::CannotDistribute do
      r.multi { @foo = 1 }
    end

    assert_equal nil, @foo

    assert_raise Redis::Distributed::CannotDistribute do
      r.discard
    end
  end

  def test_watch_unwatch
    assert_raise Redis::Distributed::CannotDistribute do
      r.watch("foo")
    end

    assert_raise Redis::Distributed::CannotDistribute do
      r.unwatch
    end
  end
end

Version data entries

21 entries across 20 versions & 7 rubygems

Version Path
finsync_redis-3.3.5 test/distributed_transactions_test.rb
redis-3.3.5 test/distributed_transactions_test.rb
logstash-filter-cache-redis-0.3.1 vendor/bundle/jruby/1.9/gems/redis-3.3.3/test/distributed_transactions_test.rb
logstash-filter-cache-redis-0.3.0 vendor/bundle/jruby/1.9/gems/redis-3.3.3/test/distributed_transactions_test.rb
logstash-filter-cache-redis-0.2.0 vendor/bundle/jruby/1.9/gems/redis-3.3.3/test/distributed_transactions_test.rb
logstash-filter-cache-redis-0.1.0 vendor/bundle/jruby/1.9/gems/redis-3.3.3/test/distributed_transactions_test.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/redis-3.3.3/test/distributed_transactions_test.rb
redis-3.3.3 test/distributed_transactions_test.rb
abaci-0.3.0 vendor/bundle/gems/redis-3.3.2/test/distributed_transactions_test.rb
abaci-0.3.0 vendor/bundle/gems/redis-3.3.1/test/distributed_transactions_test.rb
redis-3.3.2 test/distributed_transactions_test.rb
redis-3.3.1 test/distributed_transactions_test.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/redis-3.3.0/test/distributed_transactions_test.rb
redis-3.3.0 test/distributed_transactions_test.rb
discourse-redis-3.2.2 test/distributed_transactions_test.rb
redis-3.2.2 test/distributed_transactions_test.rb
redis-3.2.1 test/distributed_transactions_test.rb
redis-3.2.0 test/distributed_transactions_test.rb
redis-3.1.0 test/distributed_transactions_test.rb
redis-3.0.7 test/distributed_transactions_test.rb