Skip to content

Commit bb60a76

Browse files
committed
test: enable race detector
Unfortunately we can only enable the race detector for ci and unit tests. system-tests are building the apm-server binary (CGO disabled by default) so we can't enable the race detector as it requires cgo.
1 parent 972c491 commit bb60a76

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
cache: true
5454
- env:
5555
CGO_ENABLED: "0"
56-
run: go test -v ./...
56+
run: go test -v -race ./...
5757

5858
system-test:
5959
runs-on: ubuntu-latest

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ apm-server-oss:
7878

7979
.PHONY: test
8080
test:
81-
@go test $(GOMODFLAG) $(GOTESTFLAGS) ./...
81+
@go test $(GOMODFLAG) $(GOTESTFLAGS) -race ./...
8282

8383
.PHONY: system-test
8484
system-test:
85-
@(cd systemtest; go test $(GOMODFLAG) $(GOTESTFLAGS) -timeout=20m ./...)
85+
@(cd systemtest; go test $(GOMODFLAG) $(GOTESTFLAGS) -race -timeout=20m ./...)
8686

8787
.PHONY:
8888
clean:

0 commit comments

Comments
 (0)