diff --git a/command/agent/catalog_endpoint_test.go b/command/agent/catalog_endpoint_test.go index 251d288df..f4ea16d45 100644 --- a/command/agent/catalog_endpoint_test.go +++ b/command/agent/catalog_endpoint_test.go @@ -271,7 +271,7 @@ func TestCatalogNodes_DistanceSort(t *testing.T) { if err := srv.agent.RPC("Coordinate.Update", &arg, &out); err != nil { t.Fatalf("err: %v", err) } - time.Sleep(200 * time.Millisecond) + time.Sleep(300 * time.Millisecond) // Query again and now foo should have moved to the front of the line. req, err = http.NewRequest("GET", "/v1/catalog/nodes?dc=dc1&near=foo", nil) @@ -482,7 +482,7 @@ func TestCatalogServiceNodes_DistanceSort(t *testing.T) { if err := srv.agent.RPC("Coordinate.Update", &arg, &out); err != nil { t.Fatalf("err: %v", err) } - time.Sleep(200 * time.Millisecond) + time.Sleep(300 * time.Millisecond) // Query again and now foo should have moved to the front of the line. req, err = http.NewRequest("GET", "/v1/catalog/service/api?tag=a&near=foo", nil) diff --git a/command/agent/coordinate_endpoint_test.go b/command/agent/coordinate_endpoint_test.go index 8da0a5b39..145ea810e 100644 --- a/command/agent/coordinate_endpoint_test.go +++ b/command/agent/coordinate_endpoint_test.go @@ -99,7 +99,7 @@ func TestCoordinate_Nodes(t *testing.T) { if err := srv.agent.RPC("Coordinate.Update", &arg2, &out); err != nil { t.Fatalf("err: %v", err) } - time.Sleep(200 * time.Millisecond) + time.Sleep(300 * time.Millisecond) // Query back and check the nodes are present and sorted correctly. req, err = http.NewRequest("GET", "/v1/coordinate/nodes?dc=dc1", nil) diff --git a/command/agent/health_endpoint_test.go b/command/agent/health_endpoint_test.go index 02330a37c..7bcbc9116 100644 --- a/command/agent/health_endpoint_test.go +++ b/command/agent/health_endpoint_test.go @@ -126,7 +126,7 @@ func TestHealthChecksInState_DistanceSort(t *testing.T) { if err := srv.agent.RPC("Coordinate.Update", &arg, &out); err != nil { t.Fatalf("err: %v", err) } - time.Sleep(200 * time.Millisecond) + time.Sleep(300 * time.Millisecond) // Query again and now foo should have moved to the front of the line. resp = httptest.NewRecorder() @@ -320,7 +320,7 @@ func TestHealthServiceChecks_DistanceSort(t *testing.T) { if err := srv.agent.RPC("Coordinate.Update", &arg, &out); err != nil { t.Fatalf("err: %v", err) } - time.Sleep(200 * time.Millisecond) + time.Sleep(300 * time.Millisecond) // Query again and now foo should have moved to the front of the line. resp = httptest.NewRecorder() @@ -487,7 +487,7 @@ func TestHealthServiceNodes_DistanceSort(t *testing.T) { if err := srv.agent.RPC("Coordinate.Update", &arg, &out); err != nil { t.Fatalf("err: %v", err) } - time.Sleep(200 * time.Millisecond) + time.Sleep(300 * time.Millisecond) // Query again and now foo should have moved to the front of the line. resp = httptest.NewRecorder()