-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
testing: timeout docs for "go test -h" are ambiguous #20090
Comments
Oh no, not a dup. Sorry. |
I just faced some confusing related to this ambiguous text message myself. My colleague thought it applied to the entire test run. I thought he was wrong, as the usage message clearly says
Which you can then run with
And then run: You'll see that this DOES run. So clearly the timeout value IS on a per package level. It is NOT applied on the entire test run, and it is not applied per individual level. Which is why I propose that we change the message to something like:
Or anything similar that mentions the word " |
CL https://golang.org/cl/45816 mentions this issue. |
"go test -h" says this about timeouts:
"A test" is ambiguous in this context. I took it to mean "A single test", that is, "Each test has a timeout of
t
". Test runners in other languages usually default to this behavior for tests. However, the flag output indicates the timeout covers the entire test run, not individual tests.This also tripped up at least one person recently in the
#golang-newbies
Slack channel. It would be good if the output was clear that the timeout covers the entire test run, not individual tests.The text was updated successfully, but these errors were encountered: