test: rename race.go to race_test.go #5869
Merged
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.
race.go
has the following build constraints:and sets the package global variable
raceMode
totrue
.The way things are currently, I get a build failure when I try to run all tests under grpc with
--config==gotsan
:I don't quite understand why I see this failure, because if I do
blaze test third_party/golang/grpc/test:test_test --config=gotsan
, that works.What I do understand though is that the we end up having two BUILD targets for the test package,
test
andtest_test
. The former contains files in this package which don't have an_test.go
suffix. And renamingrace.go
torace_test.go
puts in thetest_test
package and things work fine with this approach.Also,
race.go
sets theraceMode
variable which is defined inend2end_test.go
. So, it makes sense for the former to be part of thetest_test
package.RELEASE NOTES: none