Sha256: b79915bea50d0badc0e2687ecf4243384435a67dccf6557a6d8dd7434bf41149

Contents?: true

Size: 1.26 KB

Versions: 21

Compression:

Stored size: 1.26 KB

Contents

# encoding: UTF-8

require File.expand_path("helper", File.dirname(__FILE__))
require "lint/strings"

class TestDistributedCommandsOnStrings < Test::Unit::TestCase

  include Helper::Distributed
  include Lint::Strings

  def test_mget
    assert_raise Redis::Distributed::CannotDistribute do
      r.mget("foo", "bar")
    end
  end

  def test_mget_mapped
    assert_raise Redis::Distributed::CannotDistribute do
      r.mapped_mget("foo", "bar")
    end
  end

  def test_mset
    assert_raise Redis::Distributed::CannotDistribute do
      r.mset(:foo, "s1", :bar, "s2")
    end
  end

  def test_mset_mapped
    assert_raise Redis::Distributed::CannotDistribute do
      r.mapped_mset(:foo => "s1", :bar => "s2")
    end
  end

  def test_msetnx
    assert_raise Redis::Distributed::CannotDistribute do
      r.set("foo", "s1")
      r.msetnx(:foo, "s2", :bar, "s3")
    end
  end

  def test_msetnx_mapped
    assert_raise Redis::Distributed::CannotDistribute do
      r.set("foo", "s1")
      r.mapped_msetnx(:foo => "s2", :bar => "s3")
    end
  end

  def test_bitop
    target_version "2.5.10" do
      assert_raise Redis::Distributed::CannotDistribute do
        r.set("foo", "a")
        r.set("bar", "b")

        r.bitop(:and, "foo&bar", "foo", "bar")
      end
    end
  end
end

Version data entries

21 entries across 20 versions & 7 rubygems

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