Make the currently-skipped known-failing test actually fail.
Before it was marked as skipped until we could fix it, but if you
forced it to run, it should print out a panic stack trace and then say
PASS. So this makes it actually fail.
Actual fix coming later, now that we have an actual failing list.
diff --git a/server.go b/server.go
index 4637818..256aa9c 100644
--- a/server.go
+++ b/server.go
@@ -55,6 +55,7 @@
var (
testHookOnConn func()
testHookGetServerConn func(*serverConn)
+ testHookOnPanic func(sc *serverConn, panicVal interface{}) (rePanic bool)
)
// TODO: finish GOAWAY support. Consider each incoming frame type and
@@ -450,8 +451,19 @@
}
}
+func (sc *serverConn) notePanic() {
+ if testHookOnPanic != nil {
+ if e := recover(); e != nil {
+ if testHookOnPanic(sc, e) {
+ panic(e)
+ }
+ }
+ }
+}
+
func (sc *serverConn) serve() {
sc.serveG.check()
+ defer sc.notePanic()
defer sc.conn.Close()
defer sc.closeAllStreamsOnConnClose()
defer sc.stopShutdownTimer()