File tree 3 files changed +10
-2
lines changed
3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -960,7 +960,7 @@ def quit
960
960
# Synchronously save the dataset to disk and then shut down the server.
961
961
def shutdown
962
962
synchronize do
963
- @client . call [ :shutdown ]
963
+ @client . call_without_reply [ :shutdown ]
964
964
end
965
965
end
966
966
Original file line number Diff line number Diff line change @@ -48,6 +48,13 @@ def call(*args)
48
48
reply
49
49
end
50
50
51
+ # Assume that this method is called with a single array argument. No
52
+ # backwards compat here, since it was introduced in 2.2.2.
53
+ def call_without_reply ( command )
54
+ process ( [ command ] )
55
+ nil
56
+ end
57
+
51
58
# Starting with 2.2.1, assume that this method is called with a single
52
59
# array argument. Check its size for backwards compat.
53
60
def call_loop ( *args )
Original file line number Diff line number Diff line change 47
47
redis_mock ( :shutdown => lambda { "+SHUTDOWN" } ) do
48
48
redis = Redis . new ( OPTIONS . merge ( :port => 6380 ) )
49
49
50
- assert "SHUTDOWN" == redis . shutdown
50
+ # SHUTDOWN does not reply: test that it does not raise here.
51
+ assert nil == redis . shutdown
51
52
end
52
53
end
53
54
You can’t perform that action at this time.
0 commit comments