-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
proposal: testing: run tests in parallel by default #21214
Comments
See also #17751 and the attached boilerplate "parallelize" changes. |
It would be very difficult to make this change with the existing testing package, as that would be certain to break many existing tests. Writing This might be something to consider in a new testing package, but I don't see any path from the current package to a place where tests are run in parallel by default. I could imagine permitting people to say Closing this issue. |
Right, but as said in the proposal: one might forget it. and it is the same line wring over and over again. Also, when not used, race detection are less likely to happened.
What do you mean by "new testing package"?
What is
Closing this means it won't be considered to what is called "Go2"? Thanks! |
|
For Go 2 it is possible that we could create a new testing package under a different import name. However, there are no current plans to do so.
Yes. Sorry. Go 2 has to be largely backward compatible with Go 1. It can only break compatibility where necessary. This benefit of this change is not high enough. |
OK, thanks @ianlancetaylor . |
An additional flag seems possible and doesn't break compatibility. Why don't you open a separate proposal for that and we can see what the proposal review committee thinks. Thanks. |
The testing framework of go is powerful, one of it's strong points is it's natural ability to run tests in parallel.
I assert that most tests should be able to run in parallel, and if not - a detailed explanation should be given why this test should run on its own. I can gather several reasons for this proposal:
t.Serial("Modifies a database which is used by several tests")
.t.Parallel()
. It is a common case to see only the first, and the main reason for that is the the programmer forgot to type the second.I can propose two ways to accept this change:
Serial
function was called on a test.The text was updated successfully, but these errors were encountered: