Wait for standby to have a working grpc connection before we try to use it (#16905)

Also teach WaitForStandbyNode to do a better job waiting for standbys to be healthy.
This commit is contained in:
Nick Cabatoff
2022-08-26 12:50:10 -04:00
committed by GitHub
parent 7ad1559489
commit ce0cab556c
3 changed files with 16 additions and 0 deletions

View File

@@ -349,6 +349,9 @@ func WaitForStandbyNode(t testing.T, core *vault.TestClusterCore) {
if isLeader, _, clusterAddr, _ := core.Core.Leader(); isLeader != true && clusterAddr != "" {
return
}
if core.Core.ActiveNodeReplicationState() == 0 {
return
}
time.Sleep(time.Second)
}