Skip to content
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

cmd/go: when -timeout is the default (10m), pass a nonzero -test.timeout to tests #28147

Closed
bcmills opened this issue Oct 11, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@bcmills
Copy link
Member

commented Oct 11, 2018

In https://go-review.googlesource.com/c/go/+/141218/1/src/cmd/go/go_test.go#133, @ianlancetaylor notes (emphasis mine):

If you run go test, the go tool will pass its -timeout argument to the test program as the -test.timeout flag. But you will only see that when running go test, not when running the test program directly, and you will only see it if you use a -timeout option. The default value of 10 minutes is not passed to the test program by go test. This is arguably a bug. See also #14780.

The fact that -test.timeout is not passed for the default 10m timeout makes it difficult for the test to fail cleanly if that timeout is reached (see also #28135).

@bcmills bcmills added the NeedsFix label Oct 11, 2018

@bcmills bcmills added this to the Go1.12 milestone Oct 11, 2018

@bcmills bcmills self-assigned this Oct 11, 2018

@bcmills bcmills added the GoCommand label Oct 11, 2018

@bcmills bcmills changed the title cmd/go: when -timeout is the default, pass a nonzero -test.timeout to tests cmd/go: when -timeout is the default (10m), pass a nonzero -test.timeout to tests Oct 11, 2018

@bcmills

This comment has been minimized.

Copy link
Member Author

commented Nov 15, 2018

This might make #24774 easier to diagnose.

@andybons andybons modified the milestones: Go1.12, Go1.13 Feb 12, 2019

okamotoyuki added a commit to okamotoyuki/go that referenced this issue Mar 3, 2019

cmd/go/internal/test: pass default timeout to test programs if it is …
…not given from command line

Make 'go test' command to pass the default timeout (10m) to test programs if the value is not given from command line.

Fixes golang#28147
@gopherbot

This comment has been minimized.

Copy link

commented Mar 3, 2019

Change https://golang.org/cl/164963 mentions this issue: cmd/go/internal/test: pass default timeout to test programs if not given from command line

okamotoyuki added a commit to okamotoyuki/go that referenced this issue Mar 6, 2019

cmd/go/internal/test: pass default timeout to test programs even if i…
…t is not given from command line

Make 'go test' command to pass the default timeout (10m) to test programs even if the value is not given from command line.

Fixes golang#28147

okamotoyuki added a commit to okamotoyuki/go that referenced this issue Mar 10, 2019

cmd/go/internal/test: pass default timeout to test programs even if i…
…t is not given from command line

Make 'go test' command to pass the default timeout (10m) to test programs even if the value is not given from command line.

Fixes golang#28147

@gopherbot gopherbot closed this in ee64b35 Apr 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.