Conversation
zmb3
reviewed
Apr 5, 2023
lib/web/apiserver_test.golib/web/apiserver_test.go
649504d to
34bcecd
Compare
zmb3
reviewed
Apr 5, 2023
34bcecd to
2e8fd09
Compare
tigrato
reviewed
Apr 5, 2023
zmb3
approved these changes
Apr 5, 2023
tigrato
reviewed
Apr 5, 2023
Contributor
There was a problem hiding this comment.
can we add a check that verifies if GetModules doesn't have the default content? It would be a stronger check than this one.
cc @zmb3
Collaborator
There was a problem hiding this comment.
That wouldn't verify whether or not we are currently in a parallel test, it would only verify whether the modules were previously changed, which is technically something that's allowed in a non-parallel test. This would be a weaker check IMO.
Go's testing package doesn't expose an API to tell you whether or not you are in a parallel test, but they do have those checks internally, and t.Setenv will panic if called in a parallel test.
With this in place, it would not have been possible to merge the bad code in the first place.
tigrato
approved these changes
Apr 5, 2023
5e57912 to
e6a819a
Compare
e6a819a to
40f6a08
Compare
40f6a08 to
5fa65c0
Compare
zmb3
approved these changes
Apr 5, 2023
Merged
rudream
added a commit
that referenced
this pull request
Apr 5, 2023
Merged
rudream
added a commit
that referenced
this pull request
Apr 5, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes flaky tests caused by updating a test module while using
t.Parallel()withmodules.SetTestModules()Closes #24115
Closes #24105