diff --git a/http3/server_test.go b/http3/server_test.go index 9008067e8a2..36894c1d02c 100644 --- a/http3/server_test.go +++ b/http3/server_test.go @@ -201,6 +201,19 @@ var _ = Describe("Server", func() { Expect(hfs).To(HaveKeyWithValue(":status", []string{"200"})) }) + It("handles aborts", func() { + testErr := http.ErrAbortHandler + done := make(chan struct{}) + unknownStr := mockquic.NewMockStream(mockCtrl) + s.UniStreamHijacker = func(st StreamType, _ quic.Connection, str quic.ReceiveStream, err error) bool { + defer close(done) + Expect(st).To(BeZero()) + Expect(str).To(Equal(unknownStr)) + Expect(err).To(MatchError(testErr)) + return true + } + }) + It("handles a panicking handler", func() { s.Handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { panic("foobar")