Skip to content

Commit

Permalink
test: enable race detector
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kruskall committed Aug 2, 2024
1 parent 972c491 commit bb60a76
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
cache: true
- env:
CGO_ENABLED: "0"
run: go test -v ./...
run: go test -v -race ./...

system-test:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ apm-server-oss:

.PHONY: test
test:
@go test $(GOMODFLAG) $(GOTESTFLAGS) ./...
@go test $(GOMODFLAG) $(GOTESTFLAGS) -race ./...

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

.PHONY:
clean:
Expand Down

0 comments on commit bb60a76

Please sign in to comment.