Skip to content

Commit

Permalink
Fix replica online timing issue in failover test (valkey-io#1044)
Browse files Browse the repository at this point in the history
Ci reported this failure:
```
[exception]: Executing test client: ERR FAILOVER target replica is not online..
ERR FAILOVER target replica is not online.
    while executing
"$node_0 failover to $node_1_host $node_1_port"
```

We can see somehow the replica is not online in time and
casuing this failure, added a verify_replica_online to make
sure the replica is online for the test.

Signed-off-by: Binbin <binloveplay1314@qq.com>
Signed-off-by: naglera <anagler123@gmail.com>
  • Loading branch information
enjoy-binbin authored and naglera committed Oct 10, 2024
1 parent 99e5411 commit 23523a9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/integration/failover.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ start_server {overrides {save {}}} {
$node_2 replicaof $node_0_host $node_0_port
wait_for_sync $node_1
wait_for_sync $node_2
verify_replica_online $node_0 0 50
verify_replica_online $node_0 1 50
}

test {failover command fails with invalid host} {
Expand Down

0 comments on commit 23523a9

Please sign in to comment.