From b17f88b7fb823c08b0814551acbc1cf1b35a35ed Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Thu, 1 Feb 2024 15:01:48 +0000 Subject: [PATCH] consul sd tests: don't call FailNow from a background goroutine This is not allowed by the Go test framework. Signed-off-by: Bryan Boreham --- discovery/consul/consul_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discovery/consul/consul_test.go b/discovery/consul/consul_test.go index a7763e16d..e3bc7938f 100644 --- a/discovery/consul/consul_test.go +++ b/discovery/consul/consul_test.go @@ -253,7 +253,7 @@ func newServer(t *testing.T) (*httptest.Server, *SDConfig) { time.Sleep(5 * time.Second) response = ServicesTestAnswer default: - require.FailNow(t, "Unhandled consul call: %s", r.URL) + t.Errorf("Unhandled consul call: %s", r.URL) } w.Header().Add("X-Consul-Index", "1") w.Write([]byte(response))