mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-12 16:44:05 -08:00
handle web_test webhandler errors.
This commit is contained in:
parent
2881d73ed8
commit
61d793cb1f
|
@ -108,7 +108,12 @@ func TestReadyAndHealthy(t *testing.T) {
|
||||||
opts.Flags = map[string]string{}
|
opts.Flags = map[string]string{}
|
||||||
|
|
||||||
webHandler := New(nil, opts)
|
webHandler := New(nil, opts)
|
||||||
go webHandler.Run(context.Background())
|
go func() {
|
||||||
|
err := webHandler.Run(context.Background())
|
||||||
|
if err != nil {
|
||||||
|
panic(fmt.Sprintf("Can't start web handler:%s", err))
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
// Give some time for the web goroutine to run since we need the server
|
// Give some time for the web goroutine to run since we need the server
|
||||||
// to be up before starting tests.
|
// to be up before starting tests.
|
||||||
|
@ -202,7 +207,7 @@ func TestRoutePrefix(t *testing.T) {
|
||||||
go func() {
|
go func() {
|
||||||
err := webHandler.Run(context.Background())
|
err := webHandler.Run(context.Background())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(fmt.Sprintf("Can't start webhandler error %s", err))
|
panic(fmt.Sprintf("Can't start web handler:%s", err))
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue