Skip to content

Commit bedb673

Browse files
committed
GODRIVER-3313 Skip CSOT spec tests on Windows and macOS.
1 parent 5484657 commit bedb673

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

.evergreen/config.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ functions:
377377
params:
378378
shell: "bash"
379379
working_dir: src/go.mongodb.org/mongo-driver
380-
include_expansions_in_env: ["TOPOLOGY", "AUTH", "SSL", "MONGODB_URI", "CRYPT_SHARED_LIB_PATH", "SKIP_CRYPT_SHARED_LIB", "RACE", "MONGO_GO_DRIVER_COMPRESSOR", "REQUIRE_API_VERSION", "LOAD_BALANCER"]
380+
include_expansions_in_env: ["TOPOLOGY", "AUTH", "SSL", "SKIP_CSOT_TESTS", "MONGODB_URI", "CRYPT_SHARED_LIB_PATH", "SKIP_CRYPT_SHARED_LIB", "RACE", "MONGO_GO_DRIVER_COMPRESSOR", "REQUIRE_API_VERSION", "LOAD_BALANCER"]
381381
script: |
382382
${PREPARE_SHELL}
383383
bash ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
@@ -2090,6 +2090,8 @@ axes:
20902090
GCC_PATH: "/cygdrive/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin"
20912091
GO_DIST: "C:\\golang\\go1.22"
20922092
VENV_BIN_DIR: "Scripts"
2093+
# CSOT tests are unreliable on our slow Windows hosts.
2094+
SKIP_CSOT_TESTS: true
20932095
- id: "rhel87-64"
20942096
display_name: "RHEL 8.7"
20952097
run_on: rhel8.7-large
@@ -2101,6 +2103,8 @@ axes:
21012103
batchtime: 1440 # Run at most once per 24 hours.
21022104
variables:
21032105
GO_DIST: "/opt/golang/go1.22"
2106+
# CSOT tests are unreliable on our slow macOS hosts.
2107+
SKIP_CSOT_TESTS: true
21042108

21052109
# OSes that require >= 4.0 for SSL
21062110
- id: os-ssl-40
@@ -2114,6 +2118,8 @@ axes:
21142118
GCC_PATH: "/cygdrive/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin"
21152119
GO_DIST: "C:\\golang\\go1.22"
21162120
VENV_BIN_DIR: "Scripts"
2121+
# CSOT tests are unreliable on our slow Windows hosts.
2122+
SKIP_CSOT_TESTS: true
21172123
- id: "rhel87-64"
21182124
display_name: "RHEL 8.7"
21192125
run_on: rhel8.7-large
@@ -2125,6 +2131,8 @@ axes:
21252131
batchtime: 1440 # Run at most once per 24 hours.
21262132
variables:
21272133
GO_DIST: "/opt/golang/go1.22"
2134+
# CSOT tests are unreliable on our slow macOS hosts.
2135+
SKIP_CSOT_TESTS: true
21282136

21292137
- id: ocsp-rhel-87
21302138
display_name: OS
@@ -2146,6 +2154,8 @@ axes:
21462154
GCC_PATH: "/cygdrive/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin"
21472155
GO_DIST: "C:\\golang\\go1.22"
21482156
SKIP_ECS_AUTH_TEST: true
2157+
# CSOT tests are unreliable on our slow Windows hosts.
2158+
SKIP_CSOT_TESTS: true
21492159
- id: "ubuntu2004-64"
21502160
display_name: "Ubuntu 20.04"
21512161
run_on: ubuntu2004-test
@@ -2160,6 +2170,8 @@ axes:
21602170
SKIP_ECS_AUTH_TEST: true
21612171
SKIP_EC2_AUTH_TEST: true
21622172
SKIP_WEB_IDENTITY_AUTH_TEST: true
2173+
# CSOT tests are unreliable on our slow macOS hosts.
2174+
SKIP_CSOT_TESTS: true
21632175

21642176
- id: os-faas-80
21652177
display_name: OS

.evergreen/run-tests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ fi
8787

8888
AUTH=${AUTH} \
8989
SSL=${SSL} \
90+
SKIP_CSOT_TESTS=${SKIP_CSOT_TESTS} \
9091
MONGO_GO_DRIVER_CA_FILE=${MONGO_GO_DRIVER_CA_FILE} \
9192
MONGO_GO_DRIVER_KEY_FILE=${MONGO_GO_DRIVER_KEY_FILE} \
9293
MONGO_GO_DRIVER_PKCS8_ENCRYPTED_KEY_FILE=${MONGO_GO_DRIVER_PKCS8_ENCRYPTED_KEY_FILE} \

mongo/integration/unified/unified_spec_runner.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"context"
1111
"fmt"
1212
"io/ioutil"
13+
"os"
1314
"path"
1415
"strings"
1516
"testing"
@@ -150,6 +151,13 @@ func runTestFile(t *testing.T, filepath string, expectValidFail bool, opts ...*O
150151
CreateClient(false)
151152

152153
mt.RunOpts(testCase.Description, mtOpts, func(mt *mtest.T) {
154+
// Skip CSOT spec tests when SKIP_CSOT_TESTS=true. In Evergreen, we
155+
// typically set that environment variable on Windows and macOS
156+
// because the CSOT spec tests are unreliable on those hosts.
157+
if os.Getenv("SKIP_CSOT_TESTS") == "true" && strings.Contains(filepath, "client-side-operations-timeout") {
158+
mt.Skip("Skipping CSOT spec test because SKIP_CSOT_TESTS=true")
159+
}
160+
153161
defer func() {
154162
// catch panics from looking up elements and fail if it's unexpected
155163
if r := recover(); r != nil {

0 commit comments

Comments
 (0)