Skip to content

Commit cdfe172

Browse files
authored
Merge pull request #1265 from supercaracal/fix-a-test-case-for-cluster
Return an empty array instead of throwing ArgumentError if the transaction is empty in the cluster client
2 parents 7c0cde9 + bf40fb3 commit cdfe172

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cluster/test/commands_on_transactions_test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ def test_multi
2424
redis.multi
2525
end
2626

27-
assert_raises(ArgumentError) do
28-
redis.multi {}
29-
end
27+
assert_empty(redis.multi {})
3028

3129
assert_equal([1], redis.multi { |r| r.incr('counter') })
3230
end
@@ -56,6 +54,8 @@ def test_watch
5654
end
5755
end
5856

57+
assert_empty(redis.watch('{key}1', '{key}2') {})
58+
5959
redis.watch('{key}1', '{key}2') do |tx|
6060
tx.call('SET', '{key}1', '1')
6161
tx.call('SET', '{key}2', '2')

0 commit comments

Comments
 (0)