From ac91b06625a89cd310f8cf29ae0b745e4e307244 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 3bd372b633..2e48ce7f31 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 a0ad610911..e488827951 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/... + go test -race -timeout 30m ./npm/... ./cni/... ./platform/... retryCountOnTaskFailure: 3 name: "TestWindows" displayName: "Run Windows Tests"