From a16740df4aa45875a4ef6673be094f38758758ae Mon Sep 17 00:00:00 2001 From: QxBytes Date: Tue, 19 Nov 2024 10:07:12 -0800 Subject: [PATCH] add race and timeout args --- .pipelines/templates/run-unit-tests.yaml | 5 +++-- .pipelines/templates/unit-tests.stages.yaml | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.pipelines/templates/run-unit-tests.yaml b/.pipelines/templates/run-unit-tests.yaml index 3bd372b633e..2e48ce7f312 100644 --- a/.pipelines/templates/run-unit-tests.yaml +++ b/.pipelines/templates/run-unit-tests.yaml @@ -37,10 +37,11 @@ stages: pool: name: "$(BUILD_POOL_NAME_DEFAULT_WINDOWS_ALT)" steps: - # Test changes under review; only run one go test per script + # Only run one go test per script - script: | + set CGO_ENABLED=1 cd azure-container-networking/ - go test ./npm/... ./cni/... ./platform/... + go test -race -timeout 30m ./npm/... ./cni/... ./platform/... retryCountOnTaskFailure: 3 name: "TestWindows" displayName: "Run Windows Tests" diff --git a/.pipelines/templates/unit-tests.stages.yaml b/.pipelines/templates/unit-tests.stages.yaml index a0ad6109110..2fe05e64f16 100644 --- a/.pipelines/templates/unit-tests.stages.yaml +++ b/.pipelines/templates/unit-tests.stages.yaml @@ -52,8 +52,9 @@ stages: - checkout: ACNReviewChanges clean: true - script: | + set CGO_ENABLED=1 cd azure-container-networking/ - go test ./npm/... ./cni/... ./platform/... + CGO_ENABLED=1 go test -race -timeout 30m ./npm/... ./cni/... ./platform/... retryCountOnTaskFailure: 3 name: "TestWindows" displayName: "Run Windows Tests"