- Notifications
You must be signed in to change notification settings - Fork926
feat(testutil): add testutil.IsParallel()#14418
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Neat hack, thought we might use reflect but this is pretty nice.
This won't guard againstt.Parallel()
being called later, though.
How about a cleanup function that checks that the test never became parallel and warns/panics if it did?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
👍
OK, so my original idea wasn't strictly correct -- parallel usage is not what we're looking for. See#14417 for the actual 'correct' fix. |
Uh oh!
There was an error while loading.Please reload this page.
Follow-up from#14414
Adds a test helper to detect if the current test is running in parallel.
Adds this to
coderdtest.New
where we were previously silently mutating DeploymentValues.