mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 06:04:05 -08:00
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 <bjboreham@gmail.com>
This commit is contained in:
parent
46008fdecd
commit
b17f88b7fb
|
@ -253,7 +253,7 @@ func newServer(t *testing.T) (*httptest.Server, *SDConfig) {
|
||||||
time.Sleep(5 * time.Second)
|
time.Sleep(5 * time.Second)
|
||||||
response = ServicesTestAnswer
|
response = ServicesTestAnswer
|
||||||
default:
|
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.Header().Add("X-Consul-Index", "1")
|
||||||
w.Write([]byte(response))
|
w.Write([]byte(response))
|
||||||
|
|
Loading…
Reference in a new issue