wire: fix test data race (google/go-cloud#168)
This was introduced in 7d83fb8532c1455d4e81b587f31d090320f5eb9f and is surprisingly not caught by the race detector. I suspect that the testing package makes it not a strict data race, but the result is still undefined.
This commit is contained in:
@@ -67,6 +67,7 @@ func TestWire(t *testing.T) {
|
||||
t.Skip("go toolchain not available:", err)
|
||||
}
|
||||
for _, test := range tests {
|
||||
test := test
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
bctx := test.buildContext()
|
||||
@@ -137,6 +138,7 @@ func TestWire(t *testing.T) {
|
||||
if test.wantError {
|
||||
continue
|
||||
}
|
||||
test := test
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
bctx := test.buildContext()
|
||||
|
||||
Reference in New Issue
Block a user