Sha256: 88171b83603aa046478cf51248e13a6a151a9f3a4c4d5d08df1f5a7c3eb275d8

Contents?: true

Size: 1.02 KB

Versions: 54

Compression:

Stored size: 1.02 KB

Contents

# encoding: UTF-8

require File.expand_path("./helper", File.dirname(__FILE__))
require "redis/distributed"

setup do
  log = StringIO.new
  init Redis::Distributed.new(NODES, :logger => ::Logger.new(log))
end

load './test/lint/strings.rb'

test "MGET" do |r|
  assert_raise Redis::Distributed::CannotDistribute do
    r.mget("foo", "bar")
  end
end

test "MGET mapped" do |r|
  assert_raise Redis::Distributed::CannotDistribute do
    r.mapped_mget("foo", "bar")
  end
end

test "MSET" do |r|
  assert_raise Redis::Distributed::CannotDistribute do
    r.mset(:foo, "s1", :bar, "s2")
  end
end

test "MSET mapped" do |r|
  assert_raise Redis::Distributed::CannotDistribute do
    r.mapped_mset(:foo => "s1", :bar => "s2")
  end
end

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

test "MSETNX mapped" do |r|
  assert_raise Redis::Distributed::CannotDistribute do
    r.set("foo", "s1")
    r.mapped_msetnx(:foo => "s2", :bar => "s3")
  end
end

Version data entries

54 entries across 54 versions & 7 rubygems

Version Path
abaci-0.3.0 vendor/bundle/gems/redis-2.2.2/test/distributed_commands_on_strings_test.rb
classiccms-0.7.5 vendor/bundle/gems/redis-2.2.2/test/distributed_commands_on_strings_test.rb
classiccms-0.7.4 vendor/bundle/gems/redis-2.2.2/test/distributed_commands_on_strings_test.rb
classiccms-0.7.3 vendor/bundle/gems/redis-2.2.2/test/distributed_commands_on_strings_test.rb
classiccms-0.7.2 vendor/bundle/gems/redis-2.2.2/test/distributed_commands_on_strings_test.rb
classiccms-0.7.1 vendor/bundle/gems/redis-2.2.2/test/distributed_commands_on_strings_test.rb
classiccms-0.7.0 vendor/bundle/gems/redis-2.2.2/test/distributed_commands_on_strings_test.rb
classiccms-0.6.9 vendor/bundle/gems/redis-2.2.2/test/distributed_commands_on_strings_test.rb
classiccms-0.6.8 vendor/bundle/gems/redis-2.2.2/test/distributed_commands_on_strings_test.rb
classiccms-0.6.7 vendor/bundle/gems/redis-2.2.2/test/distributed_commands_on_strings_test.rb
classiccms-0.6.6 vendor/bundle/gems/redis-2.2.2/test/distributed_commands_on_strings_test.rb
classiccms-0.6.5 vendor/bundle/gems/redis-2.2.2/test/distributed_commands_on_strings_test.rb
classiccms-0.6.4 vendor/bundle/gems/redis-2.2.2/test/distributed_commands_on_strings_test.rb
classiccms-0.6.3 vendor/bundle/gems/redis-2.2.2/test/distributed_commands_on_strings_test.rb
classiccms-0.6.2 vendor/bundle/gems/redis-2.2.2/test/distributed_commands_on_strings_test.rb
classiccms-0.6.1 vendor/bundle/gems/redis-2.2.2/test/distributed_commands_on_strings_test.rb
classiccms-0.6.0 vendor/bundle/gems/redis-2.2.2/test/distributed_commands_on_strings_test.rb
classiccms-0.5.17 vendor/bundle/gems/redis-2.2.2/test/distributed_commands_on_strings_test.rb
classiccms-0.5.16 vendor/bundle/gems/redis-2.2.2/test/distributed_commands_on_strings_test.rb
classiccms-0.5.15 vendor/bundle/gems/redis-2.2.2/test/distributed_commands_on_strings_test.rb