Increases timeouts for coordinate tests.

We take the interval and add the random stagger to it, so 2X is cutting it
too close and the unit tests are often flaky.
This commit is contained in:
James Phillips 2016-03-21 16:44:35 -07:00
parent e60a095207
commit fffa8d5061
2 changed files with 4 additions and 4 deletions

View File

@ -118,7 +118,7 @@ func TestCoordinate_Update(t *testing.T) {
}
// Wait a while and the updates should get picked up.
time.Sleep(2 * s1.config.CoordinateUpdatePeriod)
time.Sleep(3 * s1.config.CoordinateUpdatePeriod)
c, err = state.CoordinateGetRaw("node1")
if err != nil {
t.Fatalf("err: %v", err)
@ -163,7 +163,7 @@ func TestCoordinate_Update(t *testing.T) {
// Wait a little while for the batch routine to run, then make sure
// exactly one of the updates got dropped (we won't know which one).
time.Sleep(2 * s1.config.CoordinateUpdatePeriod)
time.Sleep(3 * s1.config.CoordinateUpdatePeriod)
numDropped := 0
for i := 0; i < spamLen; i++ {
c, err = state.CoordinateGetRaw(fmt.Sprintf("bogusnode%d", i))
@ -269,7 +269,7 @@ func TestCoordinate_ListNodes(t *testing.T) {
if err := msgpackrpc.CallWithCodec(codec, "Coordinate.Update", &arg3, &out); err != nil {
t.Fatalf("err: %v", err)
}
time.Sleep(2 * s1.config.CoordinateUpdatePeriod)
time.Sleep(3 * s1.config.CoordinateUpdatePeriod)
// Now query back for all the nodes.
arg := structs.DCSpecificRequest{

View File

@ -1537,7 +1537,7 @@ func TestPreparedQuery_Execute(t *testing.T) {
if err := msgpackrpc.CallWithCodec(codec1, "Coordinate.Update", &req, &out); err != nil {
t.Fatalf("err: %v", err)
}
time.Sleep(2 * s1.config.CoordinateUpdatePeriod)
time.Sleep(3 * s1.config.CoordinateUpdatePeriod)
}
// Try an RTT sort. We don't have any other coordinates in there but