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

testing: not clear whether parallel tests can run in parallel with themselves #18914

Closed
mvdan opened this issue Feb 3, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@mvdan
Copy link
Member

commented Feb 3, 2017

https://golang.org/pkg/testing/#T.Parallel says:

Parallel signals that this test is to be run in parallel with (and only with) other parallel tests.

Is the test itself included in other parallel tests? You could understand that other means it's not included, but the wording isn't clear to me or a couple of people I've asked.

This is important because people (including myself) often write parallel tests in a way that they don't break other parallel tests, but not themselves. For example, it might use t.Name() as a unique identifier/key in a database.

I ran some quick tests and it does seem like a parallel test never runs in parallel with itself. Will post a doc CL soon.

@mvdan mvdan added the Documentation label Feb 3, 2017

@gopherbot

This comment has been minimized.

Copy link

commented Feb 3, 2017

CL https://golang.org/cl/36272 mentions this issue.

@gopherbot gopherbot closed this in 3e366ec Feb 7, 2017

@golang golang locked and limited conversation to collaborators Feb 7, 2018

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