Skip to content

Commit c09cd8f

Browse files
authored
test: fix a wrong test case (#327)
1 parent 51e9517 commit c09cd8f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/redis_client/test_cluster.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,14 +351,15 @@ def test_transaction_in_race_condition
351351
Fiber.yield
352352
end
353353

354-
@client.multi(watch: %w[{key}1 {key}2]) do |tx|
354+
got = @client.multi(watch: %w[{key}1 {key}2]) do |tx|
355355
another.resume
356356
v1 = @client.call('GET', '{key}1')
357-
v2 = @client.call('GET', '{key}1')
357+
v2 = @client.call('GET', '{key}2')
358358
tx.call('SET', '{key}1', v2)
359359
tx.call('SET', '{key}2', v1)
360360
end
361361

362+
assert_nil(got)
362363
assert_equal(%w[3 4], @client.call('MGET', '{key}1', '{key}2'))
363364
end
364365

0 commit comments

Comments
 (0)