Skip to content

Commit

Permalink
Stabilize the sentinel suite
Browse files Browse the repository at this point in the history
  • Loading branch information
byroot committed Aug 17, 2022
1 parent 91b087a commit 37609ff
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion test/sentinel/sentinel_command_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,21 @@ def test_sentinel_command_get_master_by_name
end

def test_sentinel_command_ckquorum
tries = 0
max_tries = 50

redis = build_sentinel_client
result = redis.sentinel('ckquorum', MASTER_NAME)
result = begin
redis.sentinel('ckquorum', MASTER_NAME)
rescue Redis::CommandError => error
tries += 1
if error.message.include?("NOQUORUM") && tries < max_tries
sleep 0.1
retry
else
raise
end
end

assert_equal result, 'OK 3 usable Sentinels. Quorum and failover authorization can be reached'
end
Expand Down

0 comments on commit 37609ff

Please sign in to comment.