File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -22,13 +22,13 @@ import (
2222)
2323
2424func RegisterTimeoutHandler () {
25+ // When the Bazel test timeout is reached, Bazel sends a SIGTERM. We
26+ // panic just like native go test would so that the user gets stack
27+ // traces of all running go routines.
28+ // See https://github.com/golang/go/blob/e816eb50140841c524fd07ecb4eaa078954eb47c/src/testing/testing.go#L2351
29+ c := make (chan os.Signal , 1 )
30+ signal .Notify (c , syscall .SIGTERM )
2531 go func () {
26- // When the Bazel test timeout is reached, Bazel sends a SIGTERM. We
27- // panic just like native go test would so that the user gets stack
28- // traces of all running go routines.
29- // See https://github.com/golang/go/blob/e816eb50140841c524fd07ecb4eaa078954eb47c/src/testing/testing.go#L2351
30- c := make (chan os.Signal , 1 )
31- signal .Notify (c , syscall .SIGTERM )
3232 <- c
3333 debug .SetTraceback ("all" )
3434 panic ("test timed out" )
You can’t perform that action at this time.
0 commit comments