Safer delays for Realloc test
License: MIT Signed-off-by: Hector Sanjuan <hector@protocol.ai>
This commit is contained in:
parent
5ed5a43432
commit
22ec357793
|
@ -830,7 +830,7 @@ func TestClustersReplicationRealloc(t *testing.T) {
|
|||
}
|
||||
|
||||
// Let the pin arrive
|
||||
time.Sleep(time.Second / 2)
|
||||
delay()
|
||||
|
||||
pin := clusters[j].Pins()[0]
|
||||
pinSerial := pin.ToSerial()
|
||||
|
@ -845,7 +845,7 @@ func TestClustersReplicationRealloc(t *testing.T) {
|
|||
t.Fatal(err)
|
||||
}
|
||||
|
||||
time.Sleep(time.Second / 2)
|
||||
time.Sleep(time.Second)
|
||||
|
||||
pin2 := clusters[j].Pins()[0]
|
||||
pinSerial2 := pin2.ToSerial()
|
||||
|
@ -870,8 +870,9 @@ func TestClustersReplicationRealloc(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
// let metrics expire
|
||||
time.Sleep(2 * time.Second)
|
||||
// let metrics expire and give time for the cluster to
|
||||
// see if they have lost the leader
|
||||
time.Sleep(4 * time.Second)
|
||||
|
||||
waitForLeader(t, clusters)
|
||||
|
||||
|
@ -887,7 +888,7 @@ func TestClustersReplicationRealloc(t *testing.T) {
|
|||
t.Fatal(err)
|
||||
}
|
||||
|
||||
time.Sleep(time.Second / 2)
|
||||
time.Sleep(time.Second)
|
||||
|
||||
numPinned := 0
|
||||
for i, c := range clusters {
|
||||
|
|
Loading…
Reference in New Issue
Block a user