From 85651ef4c02156db20f592ee465f8ee801e96e6c Mon Sep 17 00:00:00 2001 From: spacewander Date: Fri, 20 Sep 2024 13:42:34 +0800 Subject: [PATCH] ci: work around race bug Signed-off-by: spacewander --- .github/workflows/test.yml | 3 ++- common.mk | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ddd87e7fc..8ec8ef09b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -190,7 +190,8 @@ jobs: ENABLE_PROFILE=true BENCHMARK_SCALE=10 make benchmark - name: Test - run: make test + # disable race dectector to work around https://github.com/mosn/htnn/blob/696b4db07032ecc5e36b8414ec018889b7eb1957/controller/tests/integration/registries/nacos_test.go#L270 + run: ENABLE_RACE= make test - name: Upload artifact if: always() uses: actions/upload-artifact@v4 diff --git a/common.mk b/common.mk index 6ac92a1d4..83b68a732 100644 --- a/common.mk +++ b/common.mk @@ -52,7 +52,8 @@ PROTOC = protoc PROTO_FILES = $(call rwildcard,$(GO_MODULES),*.proto) GO_TARGETS = $(patsubst %.proto,%.pb.go,$(PROTO_FILES)) -TEST_OPTION ?= -gcflags="all=-N -l" -race -covermode=atomic -coverprofile=cover.out -coverpkg=${PROJECT_NAME}/... +ENABLE_RACE ?= -race +TEST_OPTION ?= -gcflags="all=-N -l" ${ENABLE_RACE} -covermode=atomic -coverprofile=cover.out -coverpkg=${PROJECT_NAME}/... MOUNT_GOMOD_CACHE = -v $(shell go env GOPATH):/go ifeq ($(IN_CI), true)