Unverified Commit 37beb5e6 authored by Moti Cohen's avatar Moti Cohen Committed by GitHub
Browse files

Fix sentinel ACL test. Timing issue. (#10510)



Fix by replacing in test blind sleep with wait_for_condition().
Co-authored-by: default avatarmoticless <moticless@github.com>
parent b53c7f2c
......@@ -31,16 +31,23 @@ test "(post-init) Set up ACL configuration" {
test "SENTINEL CONFIG SET handles on-the-fly credentials reconfiguration" {
# Make sure we're starting with a broken state...
after 5000
catch {S 1 SENTINEL CKQUORUM mymaster} err
assert_match {*NOQUORUM*} $err
wait_for_condition 200 50 {
[catch {S 1 SENTINEL CKQUORUM mymaster}] == 1
} else {
fail "Expected: Sentinel to be disconnected from master due to wrong password"
}
assert_error "*NOQUORUM*" {S 1 SENTINEL CKQUORUM mymaster}
foreach_sentinel_id id {
assert_equal {OK} [S $id SENTINEL CONFIG SET sentinel-user $::user]
assert_equal {OK} [S $id SENTINEL CONFIG SET sentinel-pass $::password]
}
after 5000
wait_for_condition 200 50 {
[catch {S 1 SENTINEL CKQUORUM mymaster}] == 0
} else {
fail "Expected: Sentinel to be connected to master after setting password"
}
assert_match {*OK*} [S 1 SENTINEL CKQUORUM mymaster]
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment