diff --git a/cmd/integration/integration.go b/cmd/integration/integration.go index 40fee2c6860..2b4598a17a0 100644 --- a/cmd/integration/integration.go +++ b/cmd/integration/integration.go @@ -38,6 +38,7 @@ import ( func main() { runtime.GOMAXPROCS(4) + util.ReallyCrash = true util.InitLogs() defer util.FlushLogs() diff --git a/pkg/util/util.go b/pkg/util/util.go index 65a645af756..ba8eb2753ec 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -25,8 +25,15 @@ import ( "github.com/golang/glog" ) +// For testing, bypass HandleCrash. +var ReallyCrash bool + // Simply catches a crash and logs an error. Meant to be called via defer. func HandleCrash() { + if ReallyCrash { + return + } + r := recover() if r != nil { callers := ""