diff options
author | Oran Agra <oran@redislabs.com> | 2021-01-12 16:21:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-12 16:21:03 +0200 |
commit | ec2d180739aa3877a45ec54438c68a7659be5159 (patch) | |
tree | cc5a4379d113e4e67fb407cb513f848b4f85f700 /tests/cluster/tests/17-diskless-load-swapdb.tcl | |
parent | b8c67ce41b51247c02a639929e4fab20189afa1e (diff) | |
parent | 049f2f080517c3f48d99726ac23f498c5b12851f (diff) | |
download | redis-ec2d180739aa3877a45ec54438c68a7659be5159.tar.gz |
Merge 6.2 RC26.2-rc2
Diffstat (limited to 'tests/cluster/tests/17-diskless-load-swapdb.tcl')
-rw-r--r-- | tests/cluster/tests/17-diskless-load-swapdb.tcl | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/cluster/tests/17-diskless-load-swapdb.tcl b/tests/cluster/tests/17-diskless-load-swapdb.tcl index a035be7be..612818cb7 100644 --- a/tests/cluster/tests/17-diskless-load-swapdb.tcl +++ b/tests/cluster/tests/17-diskless-load-swapdb.tcl @@ -22,6 +22,8 @@ test "Right to restore backups when fail to diskless load " { $replica READONLY $replica config set repl-diskless-load swapdb + $replica config set appendonly no + $replica config set save "" $replica config rewrite $master config set repl-backlog-size 1024 $master config set repl-diskless-sync yes @@ -38,7 +40,8 @@ test "Right to restore backups when fail to diskless load " { assert_equal {1} [$replica get $slot0_key] assert_equal $slot0_key [$replica CLUSTER GETKEYSINSLOT 0 1] - # Kill the replica + # Save an RDB and kill the replica + $replica save kill_instance redis $replica_id # Delete the key from master @@ -60,13 +63,12 @@ test "Right to restore backups when fail to diskless load " { restart_instance redis $replica_id $replica READONLY - # Start full sync + # Start full sync, wait till after db is flushed (backed up) wait_for_condition 500 10 { - [string match "*sync*" [$replica role]] + [s $replica_id loading] eq 1 } else { fail "Fail to full sync" } - after 100 # Kill master, abort full sync kill_instance redis $master_id @@ -74,4 +76,4 @@ test "Right to restore backups when fail to diskless load " { # Replica keys and keys to slots map still both are right assert_equal {1} [$replica get $slot0_key] assert_equal $slot0_key [$replica CLUSTER GETKEYSINSLOT 0 1] -}
\ No newline at end of file +} |