summaryrefslogtreecommitdiff
path: root/tests/cluster
diff options
context:
space:
mode:
authorOran Agra <oran@redislabs.com>2021-01-12 10:03:45 +0200
committerGitHub <noreply@github.com>2021-01-12 10:03:45 +0200
commit4f8458d8d6c59a47c6ffbb1ac88c69854ccf1592 (patch)
tree572bc02e508b2839e58dd7cbda0e34e1bc413ba6 /tests/cluster
parentb24b49039348f7570a3e5e3673384080c093060d (diff)
downloadredis-4f8458d8d6c59a47c6ffbb1ac88c69854ccf1592.tar.gz
fix race in cluster transactions test (#8312)
we didn't wait for the commands executed on the master to reach the replica.
Diffstat (limited to 'tests/cluster')
-rw-r--r--tests/cluster/tests/16-transactions-on-replica.tcl2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/cluster/tests/16-transactions-on-replica.tcl b/tests/cluster/tests/16-transactions-on-replica.tcl
index 41083f421..baed15fbc 100644
--- a/tests/cluster/tests/16-transactions-on-replica.tcl
+++ b/tests/cluster/tests/16-transactions-on-replica.tcl
@@ -15,6 +15,7 @@ set replica [Rn 1]
test "Cant read from replica without READONLY" {
$primary SET a 1
+ wait_for_ofs_sync $primary $replica
catch {$replica GET a} err
assert {[string range $err 0 4] eq {MOVED}}
}
@@ -28,6 +29,7 @@ test "Can preform HSET primary and HGET from replica" {
$primary HSET h a 1
$primary HSET h b 2
$primary HSET h c 3
+ wait_for_ofs_sync $primary $replica
assert {[$replica HGET h a] eq {1}}
assert {[$replica HGET h b] eq {2}}
assert {[$replica HGET h c] eq {3}}