Skip to content

Commit e4c2740

Browse files
authored
Fix data race in 'discard connections' pool test. [v1] (#1877)
1 parent 6378a22 commit e4c2740

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ test-race:
106106

107107
.PHONY: test-short
108108
test-short:
109-
go test $(BUILD_TAGS) -timeout 60s -short ./...
109+
go test $(BUILD_TAGS) -timeout 60s -short -race ./...
110110

111111
### Local FaaS targets. ###
112112
.PHONY: build-faas-awslambda

x/mongo/driver/topology/pool_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ func TestPool(t *testing.T) {
868868
go func() {
869869
select {
870870
case nc := <-ncs:
871-
_, err = nc.Write([]byte{5, 0, 0, 0, 0})
871+
_, err := nc.Write([]byte{5, 0, 0, 0, 0})
872872
require.NoError(t, err, "Write error")
873873
case <-time.After(100 * time.Millisecond):
874874
}

0 commit comments

Comments
 (0)