Skip to content

Commit e7e681e

Browse files
committed
Skip consistency test when using Synchrony.
1 parent 622699a commit e7e681e

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

test/connection_handling_test.rb

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -187,22 +187,24 @@ def test_config_set
187187
end
188188
end
189189

190-
def test_consistency_on_multithreaded_env
191-
t = nil
190+
driver(:ruby, :hiredis) do
191+
def test_consistency_on_multithreaded_env
192+
t = nil
193+
194+
commands = {
195+
:set => lambda { |key, value| t.kill; "+OK\r\n" },
196+
:incr => lambda { |key| ":1\r\n" },
197+
}
198+
199+
redis_mock(commands) do |redis|
200+
t = Thread.new do
201+
redis.set("foo", "bar")
202+
end
192203

193-
commands = {
194-
:set => lambda { |key, value| t.kill; "+OK\r\n" },
195-
:incr => lambda { |key| ":1\r\n" },
196-
}
204+
t.join
197205

198-
redis_mock(commands) do |redis|
199-
t = Thread.new do
200-
redis.set("foo", "bar")
206+
assert_equal 1, redis.incr("baz")
201207
end
202-
203-
t.join
204-
205-
assert_equal 1, redis.incr("baz")
206208
end
207209
end
208210
end

0 commit comments

Comments
 (0)