Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
supercaracal committed Apr 12, 2024
1 parent 2452ae2 commit e95acbe
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cluster/test/commands_on_transactions_test.rb
Expand Up @@ -38,8 +38,11 @@ def test_unwatch
end

def test_watch
assert_raises(Redis::CommandError, "CROSSSLOT Keys in request don't hash to the same slot") do
redis.watch('key1', 'key2')
assert_raises(Redis::Cluster::TransactionConsistencyError) do
redis.watch('key1', 'key2') do |tx|
tx.set('key1', '1')
tx.set('key2', '2')
end
end

assert_equal 'OK', redis.watch('{key}1', '{key}2')
Expand Down

0 comments on commit e95acbe

Please sign in to comment.