/vendor/bundle/jruby/2.1/gems/redis-3.0.7/test/distributed_blocking_commands_test.rb
https://github.com/delowong/logstash · Ruby · 46 lines · 36 code · 9 blank · 1 comment · 0 complexity · c31b1befb8aad2c94148b98f688816ce MD5 · raw file
- # encoding: UTF-8
- require File.expand_path("helper", File.dirname(__FILE__))
- require "lint/blocking_commands"
- class TestDistributedBlockingCommands < Test::Unit::TestCase
- include Helper::Distributed
- include Lint::BlockingCommands
- def test_blpop_raises
- assert_raises(Redis::Distributed::CannotDistribute) do
- r.blpop(["foo", "bar"])
- end
- end
- def test_blpop_raises_with_old_prototype
- assert_raises(Redis::Distributed::CannotDistribute) do
- r.blpop("foo", "bar", 0)
- end
- end
- def test_brpop_raises
- assert_raises(Redis::Distributed::CannotDistribute) do
- r.brpop(["foo", "bar"])
- end
- end
- def test_brpop_raises_with_old_prototype
- assert_raises(Redis::Distributed::CannotDistribute) do
- r.brpop("foo", "bar", 0)
- end
- end
- def test_brpoplpush_raises
- assert_raises(Redis::Distributed::CannotDistribute) do
- r.brpoplpush("foo", "bar")
- end
- end
- def test_brpoplpush_raises_with_old_prototype
- assert_raises(Redis::Distributed::CannotDistribute) do
- r.brpoplpush("foo", "bar", 0)
- end
- end
- end