diff --git a/pkg/receive/handler_test.go b/pkg/receive/handler_test.go index 4f81a3d1ca8..077596483d4 100644 --- a/pkg/receive/handler_test.go +++ b/pkg/receive/handler_test.go @@ -1786,3 +1786,12 @@ func TestHandlerFlippingHashrings(t *testing.T) { cancel() wg.Wait() } + +func TestHandlerEarlyStop(t *testing.T) { + h := NewHandler(nil, &Options{}) + h.Close() + + err := h.Run() + testutil.NotOk(t, err) + testutil.Equals(t, "http: Server closed", err.Error()) +}