Avoid timing issue in diskless-load-swapdb test ()

Since we paused the primary node earlier, the replica may enter
cluster down due to primary node pfail. Here set allow read to
prevent subsequent read errors.

Signed-off-by: Binbin <binloveplay1314@qq.com>
This commit is contained in:
Binbin 2024-10-02 04:14:30 +08:00 committed by GitHub
parent 613e4e028f
commit 9827eef4d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -78,6 +78,11 @@ test "Main db not affected when fail to diskless load" {
fail "Fail to stop the full sync" fail "Fail to stop the full sync"
} }
# Since we paused the primary node earlier, the replica may enter
# cluster down due to primary node pfail. Here set allow read to
# prevent subsequent read errors.
$replica config set cluster-allow-reads-when-down yes
# Replica keys and keys to slots map still both are right # Replica keys and keys to slots map still both are right
assert_equal {1} [$replica get $slot0_key] assert_equal {1} [$replica get $slot0_key]
assert_equal $slot0_key [$replica CLUSTER GETKEYSINSLOT 0 1] assert_equal $slot0_key [$replica CLUSTER GETKEYSINSLOT 0 1]