Skip to content

Commit

Permalink
cache: add os.Exit if starting HTTP fails (thanos-io#5084)
Browse files Browse the repository at this point in the history
Add fixes according to the suggestions here
thanos-io#5068 (comment).

Signed-off-by: Giedrius Statkevičius <[email protected]>
Signed-off-by: Nicholaswang <[email protected]>
  • Loading branch information
GiedriusS authored and Nicholaswang committed Mar 6, 2022
1 parent 30f7140 commit 5ae2208
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/cache/groupcache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,13 @@ func TestMain(m *testing.M) {
go func() {
if err = httpServer.ListenAndServe(); err != nil {
fmt.Printf("failed to listen: %s\n", err.Error())
os.Exit(1)
}
}()
go func() {
if err = httpServerH2C.ListenAndServe(); err != nil {
fmt.Printf("failed to listen: %s\n", err.Error())
os.Exit(1)
}
}()

Expand Down

0 comments on commit 5ae2208

Please sign in to comment.