From 4e0d635cc386c53bce3089fe2f46eddde0731360 Mon Sep 17 00:00:00 2001 From: Quang-Minh Nguyen Date: Thu, 13 Mar 2025 08:40:06 +0700 Subject: [PATCH 1/2] test: Quarantine Praefect flaky tests on MacOS --- internal/praefect/coordinator_test.go | 2 ++ internal/praefect/server_test.go | 1 + 2 files changed, 3 insertions(+) diff --git a/internal/praefect/coordinator_test.go b/internal/praefect/coordinator_test.go index 88ab9dbad5..d40af7650b 100644 --- a/internal/praefect/coordinator_test.go +++ b/internal/praefect/coordinator_test.go @@ -1828,6 +1828,8 @@ func TestAbsentCorrelationID(t *testing.T) { } func TestCoordinatorEnqueueFailure(t *testing.T) { + testhelper.SkipWithMacOS(t, "this test is extremely flaky on macos platform") + t.Parallel() conf := config.Config{ VirtualStorages: []*config.VirtualStorage{ diff --git a/internal/praefect/server_test.go b/internal/praefect/server_test.go index 70916f0dc5..6de18fd257 100644 --- a/internal/praefect/server_test.go +++ b/internal/praefect/server_test.go @@ -936,6 +936,7 @@ func TestProxyWrites(t *testing.T) { } func TestErrorThreshold(t *testing.T) { + testhelper.SkipWithMacOS(t, "this test is extremely flaky on macos platform") t.Parallel() backendToken := "" backend, cleanup := newMockDownstream(t, backendToken, func(srv *grpc.Server) { -- GitLab From d0684934781f70f411a43cc35ae4e0847de84b82 Mon Sep 17 00:00:00 2001 From: Quang-Minh Nguyen Date: Thu, 13 Mar 2025 08:46:46 +0700 Subject: [PATCH 2/2] test: Add --rerun-fails flag to test target --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b30b656d41..131cfe1fd6 100644 --- a/Makefile +++ b/Makefile @@ -267,7 +267,7 @@ find_go_sources = $(shell find ${SOURCE_DIR} -type d \( -path "${SO run_go_tests = PATH='${SOURCE_DIR}/internal/testhelper/testdata/home/bin:${PATH}' \ TEST_TMP_DIR='${TEST_TMP_DIR}' \ TEST_LOG_DIR='${TEST_LOG_DIR}' \ - ${GOTESTSUM} --format ${TEST_FORMAT} --junitfile '${TEST_JUNIT_REPORT}' --jsonfile '${TEST_JSON_REPORT}' -- -ldflags '${GO_LDFLAGS}' -tags '${SERVER_BUILD_TAGS}' ${TEST_OPTIONS} ${TEST_PACKAGES} + ${GOTESTSUM} --format ${TEST_FORMAT} --junitfile '${TEST_JUNIT_REPORT}' --jsonfile '${TEST_JSON_REPORT}' --rerun-fails --packages="${TEST_PACKAGES}" -- -ldflags '${GO_LDFLAGS}' -tags '${SERVER_BUILD_TAGS}' ${TEST_OPTIONS} ## Test options passed to `dlv test`. DEBUG_OPTIONS ?= $(patsubst -%,-test.%,${TEST_OPTIONS}) -- GitLab