summaryrefslogtreecommitdiff
path: root/tests/cluster/cluster.tcl
diff options
context:
space:
mode:
authorOran Agra <oran@redislabs.com>2021-01-12 09:41:57 +0200
committerGitHub <noreply@github.com>2021-01-12 09:41:57 +0200
commit264953871b97bcc3d663cd006578c151a13b48ca (patch)
treeb9ad0ab8dfcc6ab182fd5631af557ccbc34bb576 /tests/cluster/cluster.tcl
parent542455ce2afbaffc065afbfdf6578399b8faecda (diff)
downloadredis-264953871b97bcc3d663cd006578c151a13b48ca.tar.gz
Fix cluster diskless load swapdb test (#8308)
The test was trying to wait for the replica to start loading the rdb from the master before it kills the master, but it was actually waiting for ROLE to be in "sync" mode, which corresponds to REPL_STATE_TRANSFER that starts before the actual loading starts. now instead it waits for the loading flag to be set. Besides, the test was dependent on the previous configuration of the servers, relying on the fact the replica is configured to persist (either RDB of AOF), now it is set explicitly.
Diffstat (limited to 'tests/cluster/cluster.tcl')
-rw-r--r--tests/cluster/cluster.tcl5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/cluster/cluster.tcl b/tests/cluster/cluster.tcl
index e894823de..ffb268561 100644
--- a/tests/cluster/cluster.tcl
+++ b/tests/cluster/cluster.tcl
@@ -57,6 +57,11 @@ proc CI {n field} {
get_info_field [R $n cluster info] $field
}
+# Return the value of the specified INFO field.
+proc s {n field} {
+ get_info_field [R $n info] $field
+}
+
# Assuming nodes are reest, this function performs slots allocation.
# Only the first 'n' nodes are used.
proc cluster_allocate_slots {n} {