@@ -31,13 +31,21 @@ start_server {overrides {hz 500 active-replica yes multi-master yes}} {
31
31
$R(3) replicaof $R_host(2) $R_port(2)
32
32
}
33
33
34
- after 2000
34
+ test " $topology all nodes up" {
35
+ for {set j 0} {$j < 4} {incr j} {
36
+ wait_for_condition 50 100 {
37
+ [string match {*all_master_link_status:up*} [$R($j) info replication]]
38
+ } else {
39
+ fail " Multimaster group didn't connect up in a reasonable period of time"
40
+ }
41
+ }
42
+ }
35
43
36
44
test " $topology replicates to all nodes" {
37
45
$R(0) set testkey foo
38
46
after 500
39
47
for {set n 0} {$n < 4} {incr n} {
40
- wait_for_condition 50 1000 {
48
+ wait_for_condition 50 100 {
41
49
[$R($n) get testkey] == " foo"
42
50
} else {
43
51
fail " Failed to replicate to $n "
@@ -48,12 +56,17 @@ start_server {overrides {hz 500 active-replica yes multi-master yes}} {
48
56
test " $topology replicates only once" {
49
57
$R(0) set testkey 1
50
58
after 500
59
+ # wait_for_condition 50 100 {
60
+ # [$R(1) get testkey] == 1 && [$R(2) get testkey] == 1
61
+ # } else {
62
+ # fail "Set failed to replicate"
63
+ # }
51
64
$R(1) incr testkey
52
65
after 500
53
66
$R(2) incr testkey
54
67
after 500
55
68
for {set n 0} {$n < 4} {incr n} {
56
- wait_for_condition 50 1000 {
69
+ wait_for_condition 100 100 {
57
70
[$R($n) get testkey] == 3
58
71
} else {
59
72
fail " node $n did not replicate"
@@ -69,7 +82,7 @@ start_server {overrides {hz 500 active-replica yes multi-master yes}} {
69
82
$R(0) incr testkey
70
83
$R(0) exec
71
84
for {set n 0} {$n < 4} {incr n} {
72
- wait_for_condition 50 1000 {
85
+ wait_for_condition 50 100 {
73
86
[$R($n) get testkey] == 3
74
87
} else {
75
88
fail " node $n failed to replicate"
0 commit comments