1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
Index: ruby-em-hiredis-0.2.1/spec/base_client_spec.rb
===================================================================
--- ruby-em-hiredis-0.2.1.orig/spec/base_client_spec.rb 2014-11-23 16:12:34.672382770 +0100
+++ ruby-em-hiredis-0.2.1/spec/base_client_spec.rb 2014-11-23 16:21:08.049180753 +0100
@@ -14,7 +14,8 @@
}
end
- it "should emit an event on reconnect failure, with the retry count" do
+ it "should emit an event on reconnect failure, with the retry count",
+ :localhost => true do
# Assumes there is no redis server on 9999
connect(1, "redis://localhost:9999/") do |redis|
expected = 1
@@ -35,7 +36,8 @@
end
end
- it "should fail the client deferrable after 4 unsuccessful attempts" do
+ it "should fail the client deferrable after 4 unsuccessful attempts",
+ :localhost => true do
connect(1, "redis://localhost:9999/") do |redis|
events = []
redis.on(:reconnect_failed) { |count|
@@ -50,7 +52,8 @@
end
end
- it "should fail commands immediately when in failed state" do
+ it "should fail commands immediately when in failed state",
+ :localhost => true do
connect(1, "redis://localhost:9999/") do |redis|
redis.fail
redis.get('foo').errback { |error|
@@ -61,7 +64,8 @@
end
end
- it "should fail queued commands when entering failed state" do
+ it "should fail queued commands when entering failed state",
+ :localhost => true do
connect(1, "redis://localhost:9999/") do |redis|
redis.get('foo').errback { |error|
error.class.should == EM::Hiredis::Error
@@ -72,7 +76,8 @@
end
end
- it "should allow reconfiguring the client at runtime" do
+ it "should allow reconfiguring the client at runtime",
+ :localhost => true do
connect(1, "redis://localhost:9999/") do |redis|
redis.on(:reconnect_failed) {
redis.configure("redis://localhost:6379/9")
|