-
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: T.Setenv can be called after T.Parallel #55128
Comments
I'm not sure what is wrong with calling |
I think noi@ means that a sub test is flaky when it calls |
Ah, yes, I see. We need to walk the |
Thank you for your replying! I'm trying to fix this issue by passing |
Change https://go.dev/cl/431101 mentions this issue: |
I sent my changes, so I would appreciate it if you could review it when you have time🙇♂️ |
Change https://go.dev/cl/434115 mentions this issue: |
Add the description of Setenv that it cannot use if the test have parallel ancestors. Fixes #55128 Change-Id: Ia5a1deaa1a3116d1ebb439600a7d316c7d155412 Reviewed-on: https://go-review.googlesource.com/c/go/+/434115 Auto-Submit: Bryan Mills <bcmills@google.com> Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Bryan Mills <bcmills@google.com>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
T.Setenv
will panic if it be called afterT.Parallel
but it can be called inT.Run
.Sample code:
https://go.dev/play/p/54VhJKYpb_q
What did you expect to see?
I think it should panic even in
T.Run
.What did you see instead?
Those tests become flaky without panic.
Others
I'm trying to fix this issue now.
The text was updated successfully, but these errors were encountered: