-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Description
Please answer these questions before submitting your issue. Thanks!
- What version of Go are you using (
go version
)?
1.6 - What operating system and processor architecture are you using (
go env
)?
linux/amd64 - What did you do?
go test
timeouts are implemented in 2 ways:
There is the main timeout which just calls panic
when the timeout is reached.
This timeout can be disabled when you set a value less than 1
A secondary timeout is set as a failsafe which calls SIGQUIT to dump a stacktrace and then exits.
This is set to the main timeout value + 1 minute:
Line 409 in 9323de3
if dt, err := time.ParseDuration(testTimeout); err == nil && dt > 0 { |
If the main timeout is not > 0, it just stays at the default 10m.
- What did you expect to see?
The test timeout should be able to be be disabled. - What did you see instead?
The secondary timeout is in place even when no timeout is set and there is no way to disable.
We use a test helper that wraps testing.T to provide its own functionality, like setup/teardown tests.
This means the entire suite uses a single testing.T. With that, means the only way to not have go kill our integration tests is to set an really high value for the timeout (which I think also defeats the purpose of the timeout to begin with).