diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 15e243611a..332175496a 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -32,6 +32,11 @@ functions: type: system params: directory: src/go.mongodb.org/mongo-driver + - command: shell.exec + params: + working_dir: "src/go.mongodb.org/mongo-driver" + script: | + git submodule update --init # Make an env.sh and evergreen expansion file with dynamic values - command: subprocess.exec params: diff --git a/.github/dependabot.yml b/.github/dependabot.yml index af7206e80b..315e454f23 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,4 +11,8 @@ updates: - package-ecosystem: gomod directory: / schedule: - interval: "weekly" \ No newline at end of file + interval: "weekly" + - package-ecosystem: "gitsubmodule" + directory: "/" + schedule: + interval: "weekly" diff --git a/.gitmodules b/.gitmodules index e5d2a68887..e3b5c7b3ee 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "specifications"] - path = specifications - url = git@github.com:mongodb/specifications.git + path = testdata/specifications + url = https://github.com/mongodb/specifications diff --git a/Taskfile.yml b/Taskfile.yml index 1ead0236aa..6784d855c2 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -17,6 +17,8 @@ tasks: check-license: bash etc/check_license.sh + init-submodule: git submodule update --init + build: deps: [install-libmongocrypt] cmds: @@ -125,7 +127,7 @@ tasks: - go test -exec "env PKG_CONFIG_PATH=${PKG_CONFIG_PATH} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} DYLD_LIBRARY_PATH=$MACOS_LIBRARY_PATH}" ${BUILD_TAGS} -v -timeout {{.TEST_TIMEOUT}}s -p 1 ./... >> test.suite evg-test-atlas-data-lake: - - ATLAS_DATA_LAKE_INTEGRATION_TEST=true go test -v ./internal/integration -run TestUnifiedSpecs/atlas-data-lake-testing >> spec_test.suite + - ATLAS_DATA_LAKE_INTEGRATION_TEST=true go test -v ./internal/integration/unified -run TestUnifiedSpec/atlas-data-lake-testing >> spec_test.suite - ATLAS_DATA_LAKE_INTEGRATION_TEST=true go test -v ./internal/integration -run TestAtlasDataLake >> spec_test.suite evg-test-enterprise-auth: @@ -151,9 +153,6 @@ tasks: evg-test-load-balancers: # Load balancer should be tested with all unified tests as well as tests in the following # components: retryable reads, retryable writes, change streams, initial DNS seedlist discovery. - - go test ${BUILD_TAGS} ./internal/integration -run TestUnifiedSpecs/retryable-reads -v -timeout {{.TEST_TIMEOUT}}s >> test.suite - - go test ${BUILD_TAGS} ./internal/integration -run TestRetryableWritesSpec -v -timeout {{.TEST_TIMEOUT}}s >> test.suite - - go test ${BUILD_TAGS} ./internal/integration -run TestChangeStreamSpec -v -timeout {{.TEST_TIMEOUT}}s >> test.suite - go test ${BUILD_TAGS} ./internal/integration -run TestInitialDNSSeedlistDiscoverySpec/load_balanced -v -timeout {{.TEST_TIMEOUT}}s >> test.suite - go test ${BUILD_TAGS} ./internal/integration -run TestLoadBalancerSupport -v -timeout {{.TEST_TIMEOUT}}s >> test.suite - go test ${BUILD_TAGS} ./internal/integration -run TestLoadBalancedConnectionHandshake -v -timeout {{.TEST_TIMEOUT}}s >> test.suite @@ -169,20 +168,15 @@ tasks: evg-test-serverless: # Serverless should be tested with all unified tests as well as tests in the following components: CRUD, load balancer, # retryable reads, retryable writes, sessions, transactions and cursor behavior. - - go test ${BUILD_TAGS} ./internal/integration -run TestCrudSpec -v -timeout {{.TEST_TIMEOUT}}s >> test.suite - go test ${BUILD_TAGS} ./internal/integration -run TestWriteErrorsWithLabels -v -timeout {{.TEST_TIMEOUT}}s >> test.suite - go test ${BUILD_TAGS} ./internal/integration -run TestWriteErrorsDetails -v -timeout {{.TEST_TIMEOUT}}s >> test.suite - go test ${BUILD_TAGS} ./internal/integration -run TestHintErrors -v -timeout {{.TEST_TIMEOUT}}s >> test.suite - go test ${BUILD_TAGS} ./internal/integration -run TestWriteConcernError -v -timeout {{.TEST_TIMEOUT}}s >> test.suite - go test ${BUILD_TAGS} ./internal/integration -run TestErrorsCodeNamePropagated -v -timeout {{.TEST_TIMEOUT}}s >> test.suite - go test ${BUILD_TAGS} ./internal/integration -run TestLoadBalancerSupport -v -timeout {{.TEST_TIMEOUT}}s >> test.suite - - go test ${BUILD_TAGS} ./internal/integration -run TestUnifiedSpecs/retryable-reads -v -timeout {{.TEST_TIMEOUT}}s >> test.suite - go test ${BUILD_TAGS} ./internal/integration -run TestRetryableReadsProse -v -timeout {{.TEST_TIMEOUT}}s >> test.suite - - go test ${BUILD_TAGS} ./internal/integration -run TestRetryableWritesSpec -v -timeout {{.TEST_TIMEOUT}}s >> test.suite - go test ${BUILD_TAGS} ./internal/integration -run TestRetryableWritesProse -v -timeout {{.TEST_TIMEOUT}}s >> test.suite - - go test ${BUILD_TAGS} ./internal/integration -run TestUnifiedSpecs/sessions -v -timeout {{.TEST_TIMEOUT}}s >> test.suite - go test ${BUILD_TAGS} ./internal/integration -run TestSessionsProse -v -timeout {{.TEST_TIMEOUT}}s >> test.suite - - go test ${BUILD_TAGS} ./internal/integration -run TestUnifiedSpecs/transactions/legacy -v -timeout {{.TEST_TIMEOUT}}s >> test.suite - go test ${BUILD_TAGS} ./internal/integration -run TestConvenientTransactions -v -timeout {{.TEST_TIMEOUT}}s >> test.suite - go test ${BUILD_TAGS} ./internal/integration -run TestCursor -v -timeout {{.TEST_TIMEOUT}}s >> test.suite - go test ${BUILD_TAGS} ./internal/integration/unified -run TestUnifiedSpec -v -timeout {{.TEST_TIMEOUT}}s >> test.suite diff --git a/bson/bson_binary_vector_spec_test.go b/bson/bson_binary_vector_spec_test.go index dcd987b3e5..56516c61b6 100644 --- a/bson/bson_binary_vector_spec_test.go +++ b/bson/bson_binary_vector_spec_test.go @@ -15,9 +15,10 @@ import ( "testing" "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/v2/internal/spectest" ) -const bsonBinaryVectorDir = "../testdata/bson-binary-vector/" +var bsonBinaryVectorDir = spectest.Path("bson-binary-vector") type bsonBinaryVectorTests struct { Description string `json:"description"` @@ -128,18 +129,7 @@ func runBsonBinaryVectorTest(t *testing.T, testKey string, test bsonBinaryVector require.NoError(t, err, "decoding canonical BSON") t.Run("Unmarshaling", func(t *testing.T) { - skipCases := map[string]string{ - "Overflow Vector INT8": "compile-time restriction", - "Underflow Vector INT8": "compile-time restriction", - "INT8 with float inputs": "compile-time restriction", - "Overflow Vector PACKED_BIT": "compile-time restriction", - "Underflow Vector PACKED_BIT": "compile-time restriction", - "Vector with float values PACKED_BIT": "compile-time restriction", - "Negative padding PACKED_BIT": "compile-time restriction", - } - if reason, ok := skipCases[test.Description]; ok { - t.Skipf("skip test case %s: %s", test.Description, reason) - } + spectest.CheckSkip(t) errMap := map[string]string{ "FLOAT32 with padding": "padding must be 0", @@ -163,24 +153,7 @@ func runBsonBinaryVectorTest(t *testing.T, testKey string, test bsonBinaryVector }) t.Run("Marshaling", func(t *testing.T) { - skipCases := map[string]string{ - "FLOAT32 with padding": "private padding field", - "Insufficient vector data with 3 bytes FLOAT32": "invalid case", - "Insufficient vector data with 5 bytes FLOAT32": "invalid case", - "Overflow Vector INT8": "compile-time restriction", - "Underflow Vector INT8": "compile-time restriction", - "INT8 with padding": "private padding field", - "INT8 with float inputs": "compile-time restriction", - "Overflow Vector PACKED_BIT": "compile-time restriction", - "Underflow Vector PACKED_BIT": "compile-time restriction", - "Vector with float values PACKED_BIT": "compile-time restriction", - "Padding specified with no vector data PACKED_BIT": "run in alternative case", - "Exceeding maximum padding PACKED_BIT": "run in alternative case", - "Negative padding PACKED_BIT": "compile-time restriction", - } - if reason, ok := skipCases[test.Description]; ok { - t.Skipf("skip test case %s: %s", test.Description, reason) - } + spectest.CheckSkip(t) t.Parallel() diff --git a/bson/bson_corpus_spec_test.go b/bson/bson_corpus_spec_test.go index 5fce4cfd69..d0376c97d0 100644 --- a/bson/bson_corpus_spec_test.go +++ b/bson/bson_corpus_spec_test.go @@ -23,6 +23,7 @@ import ( "github.com/google/go-cmp/cmp" "go.mongodb.org/mongo-driver/v2/internal/assert" "go.mongodb.org/mongo-driver/v2/internal/require" + "go.mongodb.org/mongo-driver/v2/internal/spectest" ) type testCase struct { @@ -57,7 +58,7 @@ type parseErrorTestCase struct { String string `json:"string"` } -const dataDir = "../testdata/bson-corpus/" +var dataDir = spectest.Path("bson-corpus/tests") func findJSONFilesInDir(dir string) ([]string, error) { files := make([]string, 0) diff --git a/internal/integration/client_side_encryption_spec_test.go b/internal/integration/client_side_encryption_spec_test.go index 6a591f5879..369f631a7b 100644 --- a/internal/integration/client_side_encryption_spec_test.go +++ b/internal/integration/client_side_encryption_spec_test.go @@ -11,15 +11,15 @@ package integration import ( "os" - "path" + "path/filepath" "regexp" "testing" -) -const ( - encryptionSpecName = "client-side-encryption/legacy" + "go.mongodb.org/mongo-driver/v2/internal/spectest" ) +var encryptionSpecDir = spectest.Path("client-side-encryption/tests/legacy") + func verifyClientSideEncryptionVarsSet(t *testing.T) { t.Helper() @@ -53,7 +53,7 @@ func verifyClientSideEncryptionVarsSet(t *testing.T) { func TestClientSideEncryptionSpec(t *testing.T) { verifyClientSideEncryptionVarsSet(t) - for _, fileName := range jsonFilesInDir(t, path.Join(dataPath, encryptionSpecName)) { + for _, fileName := range jsonFilesInDir(t, encryptionSpecDir) { t.Run(fileName, func(t *testing.T) { re := regexp.MustCompile(`fle2\-Range\-.*\-Correctness`) if re.Match([]byte(fileName)) { @@ -62,7 +62,7 @@ func TestClientSideEncryptionSpec(t *testing.T) { if fileName == "kmipKMS.json" && "" == os.Getenv("KMS_MOCK_SERVERS_RUNNING") { t.Skipf("Skipping test as KMS_MOCK_SERVERS_RUNNING is not set") } - runSpecTestFile(t, encryptionSpecName, fileName) + runSpecTestFile(t, filepath.Join(encryptionSpecDir, fileName)) }) } } diff --git a/internal/integration/cmd_monitoring_helpers_test.go b/internal/integration/cmd_monitoring_helpers_test.go index e4afa1a08d..d7d6cb8227 100644 --- a/internal/integration/cmd_monitoring_helpers_test.go +++ b/internal/integration/cmd_monitoring_helpers_test.go @@ -83,7 +83,30 @@ func compareValues(mt *mtest.T, key string, expected, actual bson.RawValue) erro if typeVal, err := e.LookupErr("$$type"); err == nil { // $$type represents a type assertion // for example {field: {$$type: "binData"}} should assert that "field" is an element with a binary value - return checkValueType(mt, key, actual.Type, typeVal.StringValue()) + types := []string{} + switch typeVal.Type { + case bson.TypeArray: + elems, err := typeVal.Array().Values() + if err != nil { + return fmt.Errorf("error getting expected types: %v", err) + } + + for _, elem := range elems { + types = append(types, elem.StringValue()) + } + case bson.TypeString: + types = append(types, typeVal.StringValue()) + } + + // If at least one of the types does not return an error, then the test + // has passed. + for _, t := range types { + if err := checkValueType(mt, key, actual.Type, t); err == nil { + return nil + } + } + + return fmt.Errorf("BSON type mismatch for key %s; expected one of %v, got %s", key, types, actual.Type) } a := actual.Document() diff --git a/internal/integration/crud_spec_test.go b/internal/integration/crud_spec_test.go deleted file mode 100644 index 859de77d6a..0000000000 --- a/internal/integration/crud_spec_test.go +++ /dev/null @@ -1,320 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package integration - -import ( - "bytes" - "context" - "fmt" - "os" - "path" - "reflect" - "strings" - "testing" - - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/bsonutil" - "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" - "go.mongodb.org/mongo-driver/v2/mongo" -) - -const ( - crudTestsDir = "../../testdata/crud" - crudReadDir = "v1/read" - crudWriteDir = "v1/write" -) - -type crudTestFile struct { - Data []bson.Raw `bson:"data"` - MinServerVersion string `bson:"minServerVersion"` - MaxServerVersion string `bson:"maxServerVersion"` - Serverless string `bson:"serverless"` - Tests []crudTest `bson:"tests"` -} - -type crudTest struct { - Description string `bson:"description"` - SkipReason string `bson:"skipReason"` - Operation crudOperation `bson:"operation"` - Outcome crudOutcome `bson:"outcome"` -} - -type crudOperation struct { - Name string `bson:"name"` - Arguments bson.Raw `bson:"arguments"` -} - -type crudOutcome struct { - Error bool `bson:"error"` // only used by retryable writes tests - Result interface{} `bson:"result"` - Collection *outcomeCollection `bson:"collection"` -} - -var crudRegistry = func() *bson.Registry { - reg := bson.NewRegistry() - reg.RegisterTypeMapEntry(bson.TypeEmbeddedDocument, reflect.TypeOf(bson.Raw{})) - return reg -}() - -func TestCrudSpec(t *testing.T) { - for _, dir := range []string{crudReadDir, crudWriteDir} { - for _, file := range jsonFilesInDir(t, path.Join(crudTestsDir, dir)) { - t.Run(file, func(t *testing.T) { - runCrudFile(t, path.Join(crudTestsDir, dir, file)) - }) - } - } -} - -func verifyServerlessConstraint(mt *mtest.T, expected string) error { - serverless := os.Getenv("SERVERLESS") == "serverless" - - switch expected { - case "require": - if !serverless { - return fmt.Errorf("test requires serverless") - } - case "forbid": - if serverless { - return fmt.Errorf("test forbids serverless") - } - case "allow", "": - default: - mt.Fatalf("invalid value for serverless: %s", expected) - } - return nil -} - -func runCrudFile(t *testing.T, file string) { - content, err := os.ReadFile(file) - assert.Nil(t, err, "ReadFile error for %v: %v", file, err) - - var testFile crudTestFile - vr, err := bson.NewExtJSONValueReader(bytes.NewReader(content), false) - assert.Nil(t, err, "NewExtJSONValueReader error: %v", err) - dec := bson.NewDecoder(vr) - dec.SetRegistry(crudRegistry) - err = dec.Decode(&testFile) - assert.Nil(t, err, "decode error: %v", err) - - mt := mtest.New(t, mtest.NewOptions().MinServerVersion(testFile.MinServerVersion).MaxServerVersion(testFile.MaxServerVersion)) - - // Skip test if serverless requirements are not met. - if err = verifyServerlessConstraint(mt, testFile.Serverless); err != nil { - mt.Skipf("%v", err) - } - - for _, test := range testFile.Tests { - mt.Run(test.Description, func(mt *mtest.T) { - runCrudTest(mt, test, testFile) - }) - } -} - -func runCrudTest(mt *mtest.T, test crudTest, testFile crudTestFile) { - if len(testFile.Data) > 0 { - docs := bsonutil.RawToInterfaces(testFile.Data...) - _, err := mt.Coll.InsertMany(context.Background(), docs) - assert.Nil(mt, err, "InsertMany error: %v", err) - } - - runCrudOperation(mt, test.Description, test.Operation, test.Outcome) -} - -func verifyCrudError(mt *mtest.T, outcome crudOutcome, err error) { - opError := errorFromResult(mt, outcome.Result) - if opError == nil { - return - } - verificationErr := verifyError(opError, err) - assert.Nil(mt, verificationErr, "error mismatch: %v", verificationErr) -} - -// run a CRUD operation and verify errors and outcomes. -// the test description is needed to see determine if the test is an aggregate with $out -func runCrudOperation(mt *mtest.T, testDescription string, operation crudOperation, outcome crudOutcome) { - switch operation.Name { - case "aggregate": - cursor, err := executeAggregate(mt, mt.Coll, nil, operation.Arguments) - if outcome.Error { - assert.NotNil(mt, err, "expected Aggregate error, got nil") - verifyCrudError(mt, outcome, err) - break - } - assert.Nil(mt, err, "Aggregate error: %v", err) - // only verify cursor contents for pipelines without $out - if !strings.Contains(testDescription, "$out") { - verifyCursorResult(mt, cursor, outcome.Result) - } - case "bulkWrite": - res, err := executeBulkWrite(mt, nil, operation.Arguments) - if outcome.Error { - assert.NotNil(mt, err, "expected BulkWrite error, got nil") - verifyCrudError(mt, outcome, err) - break - } - assert.Nil(mt, err, "BulkWrite error: %v", err) - verifyBulkWriteResult(mt, res, outcome.Result) - case "count": - res, err := executeCountDocuments(mt, nil, operation.Arguments) - if outcome.Error { - assert.NotNil(mt, err, "expected CountDocuments error, got nil") - verifyCrudError(mt, outcome, err) - break - } - assert.Nil(mt, err, "CountDocuments error: %v", err) - verifyCountResult(mt, res, outcome.Result) - case "distinct": - res, err := executeDistinct(mt, nil, operation.Arguments) - if outcome.Error { - assert.NotNil(mt, err, "expected Distinct error, got nil") - verifyCrudError(mt, outcome, err) - break - } - assert.Nil(mt, err, "Distinct error: %v", err) - verifyDistinctResult(mt, res, outcome.Result) - case "find": - cursor, err := executeFind(mt, nil, operation.Arguments) - if outcome.Error { - assert.NotNil(mt, err, "expected Find error, got nil") - verifyCrudError(mt, outcome, err) - break - } - assert.Nil(mt, err, "Find error: %v", err) - verifyCursorResult(mt, cursor, outcome.Result) - case "deleteOne": - res, err := executeDeleteOne(mt, nil, operation.Arguments) - if outcome.Error { - assert.NotNil(mt, err, "expected DeleteOne error, got nil") - verifyCrudError(mt, outcome, err) - break - } - assert.Nil(mt, err, "DeleteOne error: %v", err) - verifyDeleteResult(mt, res, outcome.Result) - case "deleteMany": - res, err := executeDeleteMany(mt, nil, operation.Arguments) - if outcome.Error { - assert.NotNil(mt, err, "expected DeleteMany error, got nil") - verifyCrudError(mt, outcome, err) - break - } - assert.Nil(mt, err, "DeleteMany error: %v", err) - verifyDeleteResult(mt, res, outcome.Result) - case "findOneAndDelete": - res := executeFindOneAndDelete(mt, nil, operation.Arguments) - err := res.Err() - if outcome.Error { - assert.NotNil(mt, err, "expected FindOneAndDelete error, got nil") - verifyCrudError(mt, outcome, err) - break - } - if outcome.Result == nil { - assert.Equal(mt, mongo.ErrNoDocuments, err, "expected error %v, got %v", mongo.ErrNoDocuments, err) - break - } - assert.Nil(mt, err, "FindOneAndDelete error: %v", err) - verifySingleResult(mt, res, outcome.Result) - case "findOneAndReplace": - res := executeFindOneAndReplace(mt, nil, operation.Arguments) - err := res.Err() - if outcome.Error { - assert.NotNil(mt, err, "expected FindOneAndReplace error, got nil") - verifyCrudError(mt, outcome, err) - break - } - if outcome.Result == nil { - assert.Equal(mt, mongo.ErrNoDocuments, err, "expected error %v, got %v", mongo.ErrNoDocuments, err) - break - } - assert.Nil(mt, err, "FindOneAndReplace error: %v", err) - verifySingleResult(mt, res, outcome.Result) - case "findOneAndUpdate": - res := executeFindOneAndUpdate(mt, nil, operation.Arguments) - err := res.Err() - if outcome.Error { - assert.NotNil(mt, err, "expected FindOneAndUpdate error, got nil") - verifyCrudError(mt, outcome, err) - break - } - if outcome.Result == nil { - assert.Equal(mt, mongo.ErrNoDocuments, err, "expected error %v, got %v", mongo.ErrNoDocuments, err) - break - } - assert.Nil(mt, err, "FindOneAndUpdate error: %v", err) - verifySingleResult(mt, res, outcome.Result) - case "insertOne": - res, err := executeInsertOne(mt, nil, operation.Arguments) - if outcome.Error { - assert.NotNil(mt, err, "expected InsertOne error, got nil") - verifyCrudError(mt, outcome, err) - break - } - assert.Nil(mt, err, "InsertOne error: %v", err) - verifyInsertOneResult(mt, res, outcome.Result) - case "insertMany": - res, err := executeInsertMany(mt, nil, operation.Arguments) - if outcome.Error { - assert.NotNil(mt, err, "expected InsertMany error, got nil") - verifyCrudError(mt, outcome, err) - break - } - assert.Nil(mt, err, "InsertMany error: %v", err) - verifyInsertManyResult(mt, res, outcome.Result) - case "replaceOne": - res, err := executeReplaceOne(mt, nil, operation.Arguments) - if outcome.Error { - assert.NotNil(mt, err, "expected ReplaceOne error, got nil") - verifyCrudError(mt, outcome, err) - break - } - assert.Nil(mt, err, "ReplaceOne error: %v", err) - verifyUpdateResult(mt, res, outcome.Result) - case "updateOne": - res, err := executeUpdateOne(mt, nil, operation.Arguments) - if outcome.Error { - assert.NotNil(mt, err, "expected UpdateOne error, got nil") - verifyCrudError(mt, outcome, err) - break - } - assert.Nil(mt, err, "UpdateOne error: %v", err) - verifyUpdateResult(mt, res, outcome.Result) - case "updateMany": - res, err := executeUpdateMany(mt, nil, operation.Arguments) - if outcome.Error { - assert.NotNil(mt, err, "expected UpdateMany error, got nil") - verifyCrudError(mt, outcome, err) - break - } - assert.Nil(mt, err, "UpdateMany error: %v", err) - verifyUpdateResult(mt, res, outcome.Result) - case "estimatedDocumentCount": - res, err := executeEstimatedDocumentCount(mt, nil, operation.Arguments) - if outcome.Error { - assert.NotNil(mt, err, "expected EstimatedDocumentCount error, got nil") - verifyCrudError(mt, outcome, err) - break - } - assert.Nil(mt, err, "EstimatedDocumentCount error: %v", err) - verifyCountResult(mt, res, outcome.Result) - case "countDocuments": - res, err := executeCountDocuments(mt, nil, operation.Arguments) - if outcome.Error { - assert.NotNil(mt, err, "expected CountDocuments error, got nil") - verifyCrudError(mt, outcome, err) - break - } - assert.Nil(mt, err, "CountDocuments error: %v", err) - verifyCountResult(mt, res, outcome.Result) - default: - mt.Fatalf("unrecognized operation: %v", operation.Name) - } - - if outcome.Collection != nil { - verifyTestOutcome(mt, outcome.Collection) - } -} diff --git a/internal/integration/initial_dns_seedlist_discovery_test.go b/internal/integration/initial_dns_seedlist_discovery_test.go index 24d1d5911e..f8f6cab417 100644 --- a/internal/integration/initial_dns_seedlist_discovery_test.go +++ b/internal/integration/initial_dns_seedlist_discovery_test.go @@ -21,6 +21,7 @@ import ( "go.mongodb.org/mongo-driver/v2/internal/assert" "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" "go.mongodb.org/mongo-driver/v2/internal/serverselector" + "go.mongodb.org/mongo-driver/v2/internal/spectest" "go.mongodb.org/mongo-driver/v2/mongo" "go.mongodb.org/mongo-driver/v2/mongo/options" "go.mongodb.org/mongo-driver/v2/mongo/readpref" @@ -29,9 +30,7 @@ import ( "go.mongodb.org/mongo-driver/v2/x/mongo/driver/topology" ) -const ( - seedlistDiscoveryTestsBaseDir = "../../testdata/initial-dns-seedlist-discovery" -) +var seedlistDiscoveryTestsBaseDir = spectest.Path("initial-dns-seedlist-discovery/tests") type seedlistTest struct { URI string `bson:"uri"` diff --git a/internal/integration/retryable_writes_prose_test.go b/internal/integration/retryable_writes_prose_test.go index 64f070ff7c..5426c7d9bd 100644 --- a/internal/integration/retryable_writes_prose_test.go +++ b/internal/integration/retryable_writes_prose_test.go @@ -10,6 +10,7 @@ import ( "bytes" "context" "fmt" + "strings" "sync" "testing" "time" @@ -380,3 +381,207 @@ func TestRetryableWritesProse(t *testing.T) { } }) } + +type crudOperation struct { + Name string `bson:"name"` + Arguments bson.Raw `bson:"arguments"` +} + +type crudOutcome struct { + Error bool `bson:"error"` // only used by retryable writes tests + Result interface{} `bson:"result"` + Collection *outcomeCollection `bson:"collection"` +} + +// run a CRUD operation and verify errors and outcomes. +// the test description is needed to see determine if the test is an aggregate with $out +func runCrudOperation(mt *mtest.T, testDescription string, operation crudOperation, outcome crudOutcome) { + switch operation.Name { + case "aggregate": + cursor, err := executeAggregate(mt, mt.Coll, nil, operation.Arguments) + if outcome.Error { + assert.NotNil(mt, err, "expected Aggregate error, got nil") + verifyCrudError(mt, outcome, err) + break + } + assert.Nil(mt, err, "Aggregate error: %v", err) + // only verify cursor contents for pipelines without $out + if !strings.Contains(testDescription, "$out") { + verifyCursorResult(mt, cursor, outcome.Result) + } + case "bulkWrite": + res, err := executeBulkWrite(mt, nil, operation.Arguments) + if outcome.Error { + assert.NotNil(mt, err, "expected BulkWrite error, got nil") + verifyCrudError(mt, outcome, err) + break + } + assert.Nil(mt, err, "BulkWrite error: %v", err) + verifyBulkWriteResult(mt, res, outcome.Result) + case "count": + res, err := executeCountDocuments(mt, nil, operation.Arguments) + if outcome.Error { + assert.NotNil(mt, err, "expected CountDocuments error, got nil") + verifyCrudError(mt, outcome, err) + break + } + assert.Nil(mt, err, "CountDocuments error: %v", err) + verifyCountResult(mt, res, outcome.Result) + case "distinct": + res, err := executeDistinct(mt, nil, operation.Arguments) + if outcome.Error { + assert.NotNil(mt, err, "expected Distinct error, got nil") + verifyCrudError(mt, outcome, err) + break + } + assert.Nil(mt, err, "Distinct error: %v", err) + verifyDistinctResult(mt, res, outcome.Result) + case "find": + cursor, err := executeFind(mt, nil, operation.Arguments) + if outcome.Error { + assert.NotNil(mt, err, "expected Find error, got nil") + verifyCrudError(mt, outcome, err) + break + } + assert.Nil(mt, err, "Find error: %v", err) + verifyCursorResult(mt, cursor, outcome.Result) + case "deleteOne": + res, err := executeDeleteOne(mt, nil, operation.Arguments) + if outcome.Error { + assert.NotNil(mt, err, "expected DeleteOne error, got nil") + verifyCrudError(mt, outcome, err) + break + } + assert.Nil(mt, err, "DeleteOne error: %v", err) + verifyDeleteResult(mt, res, outcome.Result) + case "deleteMany": + res, err := executeDeleteMany(mt, nil, operation.Arguments) + if outcome.Error { + assert.NotNil(mt, err, "expected DeleteMany error, got nil") + verifyCrudError(mt, outcome, err) + break + } + assert.Nil(mt, err, "DeleteMany error: %v", err) + verifyDeleteResult(mt, res, outcome.Result) + case "findOneAndDelete": + res := executeFindOneAndDelete(mt, nil, operation.Arguments) + err := res.Err() + if outcome.Error { + assert.NotNil(mt, err, "expected FindOneAndDelete error, got nil") + verifyCrudError(mt, outcome, err) + break + } + if outcome.Result == nil { + assert.Equal(mt, mongo.ErrNoDocuments, err, "expected error %v, got %v", mongo.ErrNoDocuments, err) + break + } + assert.Nil(mt, err, "FindOneAndDelete error: %v", err) + verifySingleResult(mt, res, outcome.Result) + case "findOneAndReplace": + res := executeFindOneAndReplace(mt, nil, operation.Arguments) + err := res.Err() + if outcome.Error { + assert.NotNil(mt, err, "expected FindOneAndReplace error, got nil") + verifyCrudError(mt, outcome, err) + break + } + if outcome.Result == nil { + assert.Equal(mt, mongo.ErrNoDocuments, err, "expected error %v, got %v", mongo.ErrNoDocuments, err) + break + } + assert.Nil(mt, err, "FindOneAndReplace error: %v", err) + verifySingleResult(mt, res, outcome.Result) + case "findOneAndUpdate": + res := executeFindOneAndUpdate(mt, nil, operation.Arguments) + err := res.Err() + if outcome.Error { + assert.NotNil(mt, err, "expected FindOneAndUpdate error, got nil") + verifyCrudError(mt, outcome, err) + break + } + if outcome.Result == nil { + assert.Equal(mt, mongo.ErrNoDocuments, err, "expected error %v, got %v", mongo.ErrNoDocuments, err) + break + } + assert.Nil(mt, err, "FindOneAndUpdate error: %v", err) + verifySingleResult(mt, res, outcome.Result) + case "insertOne": + res, err := executeInsertOne(mt, nil, operation.Arguments) + if outcome.Error { + assert.NotNil(mt, err, "expected InsertOne error, got nil") + verifyCrudError(mt, outcome, err) + break + } + assert.Nil(mt, err, "InsertOne error: %v", err) + verifyInsertOneResult(mt, res, outcome.Result) + case "insertMany": + res, err := executeInsertMany(mt, nil, operation.Arguments) + if outcome.Error { + assert.NotNil(mt, err, "expected InsertMany error, got nil") + verifyCrudError(mt, outcome, err) + break + } + assert.Nil(mt, err, "InsertMany error: %v", err) + verifyInsertManyResult(mt, res, outcome.Result) + case "replaceOne": + res, err := executeReplaceOne(mt, nil, operation.Arguments) + if outcome.Error { + assert.NotNil(mt, err, "expected ReplaceOne error, got nil") + verifyCrudError(mt, outcome, err) + break + } + assert.Nil(mt, err, "ReplaceOne error: %v", err) + verifyUpdateResult(mt, res, outcome.Result) + case "updateOne": + res, err := executeUpdateOne(mt, nil, operation.Arguments) + if outcome.Error { + assert.NotNil(mt, err, "expected UpdateOne error, got nil") + verifyCrudError(mt, outcome, err) + break + } + assert.Nil(mt, err, "UpdateOne error: %v", err) + verifyUpdateResult(mt, res, outcome.Result) + case "updateMany": + res, err := executeUpdateMany(mt, nil, operation.Arguments) + if outcome.Error { + assert.NotNil(mt, err, "expected UpdateMany error, got nil") + verifyCrudError(mt, outcome, err) + break + } + assert.Nil(mt, err, "UpdateMany error: %v", err) + verifyUpdateResult(mt, res, outcome.Result) + case "estimatedDocumentCount": + res, err := executeEstimatedDocumentCount(mt, nil, operation.Arguments) + if outcome.Error { + assert.NotNil(mt, err, "expected EstimatedDocumentCount error, got nil") + verifyCrudError(mt, outcome, err) + break + } + assert.Nil(mt, err, "EstimatedDocumentCount error: %v", err) + verifyCountResult(mt, res, outcome.Result) + case "countDocuments": + res, err := executeCountDocuments(mt, nil, operation.Arguments) + if outcome.Error { + assert.NotNil(mt, err, "expected CountDocuments error, got nil") + verifyCrudError(mt, outcome, err) + break + } + assert.Nil(mt, err, "CountDocuments error: %v", err) + verifyCountResult(mt, res, outcome.Result) + default: + mt.Fatalf("unrecognized operation: %v", operation.Name) + } + + if outcome.Collection != nil { + verifyTestOutcome(mt, outcome.Collection) + } +} + +func verifyCrudError(mt *mtest.T, outcome crudOutcome, err error) { + opError := errorFromResult(mt, outcome.Result) + if opError == nil { + return + } + verificationErr := verifyError(opError, err) + assert.Nil(mt, verificationErr, "error mismatch: %v", verificationErr) +} diff --git a/internal/integration/retryable_writes_spec_test.go b/internal/integration/retryable_writes_spec_test.go deleted file mode 100644 index d4cc783554..0000000000 --- a/internal/integration/retryable_writes_spec_test.go +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (C) MongoDB, Inc. 2017-present. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -package integration - -import ( - "bytes" - "io/ioutil" - "path" - "testing" - - "go.mongodb.org/mongo-driver/v2/bson" - "go.mongodb.org/mongo-driver/v2/internal/assert" - "go.mongodb.org/mongo-driver/v2/internal/failpoint" - "go.mongodb.org/mongo-driver/v2/internal/integration/mtest" -) - -const retryableWritesTestDir = "../../testdata/retryable-writes/legacy" - -type retryableWritesTestFile struct { - RunOn []mtest.RunOnBlock `bson:"runOn"` - Data []bson.Raw `bson:"data"` - Tests []retryableWritesTest `bson:"tests"` -} - -type retryableWritesTest struct { - Description string `bson:"description"` - ClientOptions bson.Raw `bson:"clientOptions"` - UseMultipleMongoses bool `bson:"useMultipleMongoses"` - FailPoint *failpoint.FailPoint `bson:"failPoint"` - Operation crudOperation `bson:"operation"` - Outcome crudOutcome `bson:"outcome"` -} - -func TestRetryableWritesSpec(t *testing.T) { - for _, file := range jsonFilesInDir(t, retryableWritesTestDir) { - t.Run(file, func(t *testing.T) { - runRetryableWritesFile(t, path.Join(retryableWritesTestDir, file)) - }) - } -} - -func runRetryableWritesFile(t *testing.T, filePath string) { - content, err := ioutil.ReadFile(filePath) - assert.Nil(t, err, "ReadFile error for %v: %v", filePath, err) - - var testFile retryableWritesTestFile - vr, err := bson.NewExtJSONValueReader(bytes.NewReader(content), false) - assert.Nil(t, err, "NewExtJSONValueReader error: %v", err) - dec := bson.NewDecoder(vr) - dec.SetRegistry(specTestRegistry) - err = dec.Decode(&testFile) - assert.Nil(t, err, "decode error: %v", err) - - mt := mtest.New(t, mtest.NewOptions().RunOn(testFile.RunOn...).CreateClient(false)) - - for _, test := range testFile.Tests { - runRetryableWritesTest(mt, test, testFile) - } -} - -func runRetryableWritesTest(mt *mtest.T, test retryableWritesTest, testFile retryableWritesTestFile) { - // Use a low heartbeat frequency so the Client will quickly recover when using failpoints that cause SDAM state - // changes. - testClientOpts := createClientOptions(mt, test.ClientOptions) - testClientOpts.SetHeartbeatInterval(defaultHeartbeatInterval) - opts := mtest.NewOptions().ClientOptions(testClientOpts) - if mtest.ClusterTopologyKind() == mtest.Sharded && !test.UseMultipleMongoses { - // pin to a single mongos - opts = opts.ClientType(mtest.Pinned) - } - - mt.RunOpts(test.Description, opts, func(mt *mtest.T) { - // setup - insert test data and set fail point - insertDocuments(mt, mt.Coll, testFile.Data) - if test.FailPoint != nil { - mt.SetFailPoint(*test.FailPoint) - } - - // run operation and verify outcome/error - runCrudOperation(mt, test.Description, test.Operation, test.Outcome) - }) -} diff --git a/internal/integration/unified/unified_spec_runner.go b/internal/integration/unified/unified_spec_runner.go index 01b64fd35a..a81c61407c 100644 --- a/internal/integration/unified/unified_spec_runner.go +++ b/internal/integration/unified/unified_spec_runner.go @@ -90,6 +90,7 @@ func runTestDirectory(t *testing.T, directoryPath string, expectValidFail bool) // runTestFile runs the tests in the given file, with expectValidFail determining whether the tests should expect to pass or fail func runTestFile(t *testing.T, filepath string, expectValidFail bool, opts ...*Options) { + spectest.CheckSkip(t) content, err := ioutil.ReadFile(filepath) assert.Nil(t, err, "ReadFile error for file %q: %v", filepath, err) @@ -98,6 +99,9 @@ func runTestFile(t *testing.T, filepath string, expectValidFail bool, opts ...*O mtOpts := mtest.NewOptions(). RunOn(fileReqs...). CreateClient(false) + if strings.Contains(filepath, "atlas-data-lake-testing") { + mtOpts.AtlasDataLake(true) + } mt := mtest.New(t, mtOpts) for _, testCase := range testCases { diff --git a/internal/integration/unified/unified_spec_test.go b/internal/integration/unified/unified_spec_test.go index eba98345f4..9021d03e75 100644 --- a/internal/integration/unified/unified_spec_test.go +++ b/internal/integration/unified/unified_spec_test.go @@ -8,57 +8,60 @@ package unified import ( "context" - "path" + "os" "testing" + + "go.mongodb.org/mongo-driver/v2/internal/spectest" ) var ( passDirectories = []string{ - "unified-test-format/valid-pass", - "versioned-api", - "crud/unified", - "change-streams", - "transactions/unified", - "load-balancers", - "collection-management", - "command-monitoring", - "command-monitoring/logging", - "connection-monitoring-and-pooling/logging", - "sessions", - "retryable-reads/unified", - "retryable-writes/unified", - "client-side-encryption/unified", - "client-side-operations-timeout", - "gridfs", - "server-selection/logging", - "server-discovery-and-monitoring/unified", - "run-command", - "index-management", + "unified-test-format/tests/valid-pass", + "transactions-convenient-api/tests/unified", + "versioned-api/tests", + "crud/tests/unified", + "change-streams/tests/unified", + "load-balancers/tests", + "collection-management/tests", + "command-logging-and-monitoring/tests/monitoring", + "command-logging-and-monitoring/tests/logging", + "connection-monitoring-and-pooling/tests/logging", + "sessions/tests", + "retryable-reads/tests/unified", + "retryable-writes/tests/unified", + "client-side-encryption/tests/unified", + "client-side-operations-timeout/tests", + "gridfs/tests", + "server-selection/tests/logging", + "server-discovery-and-monitoring/tests/unified", + "run-command/tests/unified", + "index-management/tests", + "atlas-data-lake-testing/tests/unified", } failDirectories = []string{ - "unified-test-format/valid-fail", + "unified-test-format/tests/valid-fail", } ) -const ( - dataDirectory = "../../../testdata" -) - func TestUnifiedSpec(t *testing.T) { // Ensure the cluster is in a clean state before test execution begins. - if err := terminateOpenSessions(context.Background()); err != nil { - t.Fatalf("error terminating open transactions: %v", err) + // Don't run for Data Lake tests because it doesn't support + // "killAllSessions". + if os.Getenv("ATLAS_DATA_LAKE_INTEGRATION_TEST") != "true" { + if err := terminateOpenSessions(context.Background()); err != nil { + t.Fatalf("error terminating open transactions: %v", err) + } } for _, testDir := range passDirectories { t.Run(testDir, func(t *testing.T) { - runTestDirectory(t, path.Join(dataDirectory, testDir), false) + runTestDirectory(t, spectest.Path(testDir), false) }) } for _, testDir := range failDirectories { t.Run(testDir, func(t *testing.T) { - runTestDirectory(t, path.Join(dataDirectory, testDir), true) + runTestDirectory(t, spectest.Path(testDir), true) }) } } diff --git a/internal/integration/unified_spec_test.go b/internal/integration/unified_spec_test.go index 9a02246862..11c7974666 100644 --- a/internal/integration/unified_spec_test.go +++ b/internal/integration/unified_spec_test.go @@ -13,7 +13,7 @@ import ( "fmt" "io/ioutil" "os" - "path" + "path/filepath" "reflect" "sync" "testing" @@ -157,14 +157,8 @@ type operationError struct { ErrorLabelsOmit []string `bson:"errorLabelsOmit"` } -const dataPath string = "../../testdata/" - var directories = []string{ - "transactions/legacy", - "convenient-transactions", - "retryable-reads/legacy", - "read-write-concern/operation", - "atlas-data-lake-testing", + "read-write-concern/tests/operation", } var checkOutcomeOpts = options.Collection().SetReadPreference(readpref.Primary()).SetReadConcern(readconcern.Local()) @@ -178,9 +172,9 @@ var specTestRegistry = func() *bson.Registry { func TestUnifiedSpecs(t *testing.T) { for _, specDir := range directories { t.Run(specDir, func(t *testing.T) { - for _, fileName := range jsonFilesInDir(t, path.Join(dataPath, specDir)) { + for _, fileName := range jsonFilesInDir(t, spectest.Path(specDir)) { t.Run(fileName, func(t *testing.T) { - runSpecTestFile(t, specDir, fileName) + runSpecTestFile(t, filepath.Join(specDir, fileName)) }) } }) @@ -189,8 +183,10 @@ func TestUnifiedSpecs(t *testing.T) { // specDir: name of directory for a spec in the data/ folder // fileName: name of test file in specDir -func runSpecTestFile(t *testing.T, specDir, fileName string) { - filePath := path.Join(dataPath, specDir, fileName) +func runSpecTestFile(t *testing.T, filePath string) { + // It's possible that a JSON blob does not conform to our spec test format. + spectest.CheckSkip(t) + content, err := ioutil.ReadFile(filePath) assert.Nil(t, err, "unable to read spec test file %v: %v", filePath, err) @@ -206,9 +202,6 @@ func runSpecTestFile(t *testing.T, specDir, fileName string) { mtOpts := mtest.NewOptions(). RunOn(testFile.RunOn...). CreateClient(false) - if specDir == "atlas-data-lake-testing" { - mtOpts.AtlasDataLake(true) - } mt := mtest.New(t, mtOpts) for _, test := range testFile.Tests { diff --git a/internal/serverselector/server_selector_test.go b/internal/serverselector/server_selector_test.go index 0d114d2516..c1a8411785 100644 --- a/internal/serverselector/server_selector_test.go +++ b/internal/serverselector/server_selector_test.go @@ -157,7 +157,7 @@ func compareServers(t *testing.T, expected []*serverDesc, actual []description.S } } -const maxStalenessTestsDir = "../../testdata/max-staleness" +var maxStalenessTestsDir = spectest.Path("max-staleness/tests") // Test case for all max staleness spec tests. func TestMaxStalenessSpec(t *testing.T) { @@ -176,7 +176,7 @@ func TestMaxStalenessSpec(t *testing.T) { } } -const selectorTestsDir = "../../testdata/server-selection/server_selection" +var selectorTestsDir = spectest.Path("server-selection/tests") func selectServers(t *testing.T, test *testCase) error { servers := make([]description.Server, 0, len(test.TopologyDescription.Servers)) @@ -321,7 +321,7 @@ func TestServerSelectionSpec(t *testing.T) { "LoadBalanced", } { for _, subdir := range [...]string{"read", "write"} { - subdirPath := path.Join(topology, subdir) + subdirPath := path.Join("server_selection", topology, subdir) for _, file := range spectest.FindJSONFilesInDir(t, path.Join(selectorTestsDir, subdirPath)) { diff --git a/internal/spectest/skip.go b/internal/spectest/skip.go index 4efa8f428e..33c0002958 100644 --- a/internal/spectest/skip.go +++ b/internal/spectest/skip.go @@ -10,154 +10,819 @@ import "testing" // skipTests is a map of "fully-qualified test name" to "the reason for skipping // the test". -var skipTests = map[string]string{ - "TestURIOptionsSpec/single-threaded-options.json/Valid_options_specific_to_single-threaded_drivers_are_parsed_correctly": "The Go Driver is not single-threaded.", - // GODRIVER-2348: The wtimeoutMS write concern option is not supported. - "TestURIOptionsSpec/concern-options.json/Valid_read_and_write_concern_are_parsed_correctly": "The wtimeoutMS write concern option is not supported", - - // SPEC-1403: This test checks to see if the correct error is thrown when - // auto encrypting with a server < 4.2. Currently, the test will fail - // because a server < 4.2 wouldn't have mongocryptd, so Client construction - // would fail with a mongocryptd spawn error. - "TestClientSideEncryptionSpec/maxWireVersion.json/operation_fails_with_maxWireVersion_<_8": "Servers less than 4.2 do not have mongocryptd; see SPEC-1403", - - // GODRIVER-1827: These 2 tests assert that in-use connections are not - // closed until checked back into a closed pool, but the Go connection pool - // aggressively closes in-use connections. That behavior is currently - // required by the "Client.Disconnect" API, so skip the tests. - "TestCMAPSpec/pool-close-destroy-conns.json/When_a_pool_is_closed,_it_MUST_first_destroy_all_available_connections_in_that_pool": "Test requires that close does not aggressively close used connections", - "TestCMAPSpec/pool-close-destroy-conns.json/must_destroy_checked_in_connection_if_pool_has_been_closed": "Test requires that close does not aggressively close used connections", - - // GODRIVER-1826: The load-balancer SDAM error handling test "errors during - // authentication are processed" currently asserts that handshake errors - // trigger events "pool cleared" then "connection closed". However, the - // "error during minPoolSize population clears pool" test asserts that - // handshake errors trigger events "connection closed" then "pool cleared". - // The Go driver uses the same code path for creating all application - // connections, so those opposing event orders cannot be satisfied - // simultaneously. - // - // TODO(DRIVERS-1785): Re-enable this test once the spec test is updated to - // use the same event order as the "errors during authentication are - // processed" load-balancer SDAM spec test. - "TestCMAPSpec/pool-create-min-size-error.json/error_during_minPoolSize_population_clears_pool": "Event ordering is incompatible with load-balancer SDAM spec test (DRIVERS-1785)", - - // GODRIVER-1826: The Go connection pool does not currently always deliver - // connections created by maintain() to waiting check-outs. There is a race - // condition between the goroutine started by maintain() to check-in a - // requested connection and createConnections() picking up the next wantConn - // created by the waiting check-outs. Most of the time, createConnections() - // wins and starts creating new connections. That is not a problem for - // general use cases, but it prevents the "threads blocked by maxConnecting - // check out minPoolSize connections" test from passing. - // - // TODO(DRIVERS-2225): Re-enable this test once the spec test is updated to - // support the Go pool minPoolSize maintain() behavior. - "TestCMAPSpec/pool-checkout-minPoolSize-connection-maxConnecting.json/threads_blocked_by_maxConnecting_check_out_minPoolSize_connections": "Test requires that connections established by minPoolSize are immediately used to satisfy check-out requests (DRIVERS-2225)", - - // GODRIVER-1826: The Go connection pool currently delivers any available - // connection to the earliest waiting check-out request, independent of if - // that check-out request already requested a new connection. That behavior - // is currently incompatible with the "threads blocked by maxConnecting - // check out returned connections" test, which expects that check-out - // requests that request a new connection cannot be satisfied by a check-in. - // - // TODO(DRIVERS-2223): Re-enable this test once the spec test is updated to - // support the Go pool check-in behavior. - "TestCMAPSpec/pool-checkout-returned-connection-maxConnecting.json/threads_blocked_by_maxConnecting_check_out_returned_connections": "Test requires a checked-in connections cannot satisfy a check-out waiting on a new connection (DRIVERS-2223)", - - // TODO(GODRIVER-2129): Re-enable this test once GODRIVER-2129 is done. - "TestAuthSpec/connection-string.json/must_raise_an_error_when_the_hostname_canonicalization_is_invalid": "Support will be added with GODRIVER-2129.", - - // GODRIVER-1773: This test runs a "find" with limit=4 and batchSize=3. It - // expects batchSize values of three for the "find" and one for the - // "getMore", but we send three for both. - "TestUnifiedSpec/command-monitoring/find.json/A_successful_find_event_with_a_getmore_and_the_server_kills_the_cursor_(<=_4.4)": "See GODRIVER-1773", - "TestUnifiedSpec/unified-test-format/valid-pass/poc-command-monitoring.json/A_successful_find_event_with_a_getmore_and_the_server_kills_the_cursor_(<=_4.4)": "See GODRIVER-1773", - - // GODRIVER-2577: The following spec tests require canceling ops - // immediately, but the current logic clears pools and cancels in-progress - // ops after two the heartbeat failures. - "TestUnifiedSpec/server-discovery-and-monitoring/unified/interruptInUse-pool-clear.json/Connection_pool_clear_uses_interruptInUseConnections=true_after_monitor_timeout": "Go Driver clears after multiple timeout", - "TestUnifiedSpec/server-discovery-and-monitoring/unified/interruptInUse-pool-clear.json/Error_returned_from_connection_pool_clear_with_interruptInUseConnections=true_is_retryable": "Go Driver clears after multiple timeout", - "TestUnifiedSpec/server-discovery-and-monitoring/unified/interruptInUse-pool-clear.json/Error_returned_from_connection_pool_clear_with_interruptInUseConnections=true_is_retryable_for_write": "Go Driver clears after multiple timeout", +var skipTests = map[string][]string{ + // SPEC-1403: This test checks to see if the correct error is thrown when auto + // encrypting with a server < 4.2. Currently, the test will fail because a + // server < 4.2 wouldn't have mongocryptd, so Client construction would fail + // with a mongocryptd spawn error. + "Servers less than 4.2 do not have mongocryptd; see SPEC-1403": { + "TestClientSideEncryptionSpec/maxWireVersion.json/operation_fails_with_maxWireVersion_<_8", + }, + + // TODO(GODRIVER-1826): Tests for incompatible event ordering in load-balancer + // SDAM spec tests. + "Event ordering is incompatible with load-balancer SDAM spec test (DRIVERS-1785)": { + "TestCMAPSpec/pool-create-min-size-error.json/error_during_minPoolSize_population_clears_pool", + }, + + // TODO(GODRIVER-1826): Race condition prevents the "threads blocked by + // maxConnecting" test from passing. + "Test requires that connections established by minPoolSize are immediately used to satisfy check-out requests (DRIVERS-2225)": { + "TestCMAPSpec/pool-checkout-minPoolSize-connection-maxConnecting.json/threads_blocked_by_maxConnecting_check_out_minPoolSize_connections", + }, + + // TODO(GODRIVER-1826): The Go connection pool behavior for check-in requests + // is incompatible with expected test behavior. + "Test requires a checked-in connections cannot satisfy a check-out waiting on a new connection (DRIVERS-2223)": { + "TestCMAPSpec/pool-checkout-returned-connection-maxConnecting.json/threads_blocked_by_maxConnecting_check_out_returned_connections", + }, + + // TODO(GODRIVER-2129): Re-enable this test once the feature is implemented. + // TODO(GODRIVER-2129): Support for + // sspiHostnamecanonicalization=none/forward/forwardAndReverse for Kerberos + "Requires sspiHostnamecanonicalization=none/forward/forwardAndReverse support for Kerberos (GODRIVER-2129)": { + "TestAuthSpec/connection-string.json/must_raise_an_error_when_the_hostname_canonicalization_is_invalid", + }, + + // TODO(GODRIVER-2183): Implementation of Socks5 Proxy Support is pending. + "Requires Socks5 Proxy Support (GODRIVER-2183)": { + "TestURIOptionsSpec/proxy-options.json/proxyPort_without_proxyHost", + "TestURIOptionsSpec/proxy-options.json/proxyUsername_without_proxyHost", + "TestURIOptionsSpec/proxy-options.json/proxyPassword_without_proxyHost", + "TestURIOptionsSpec/proxy-options.json/all_other_proxy_options_without_proxyHost", + "TestURIOptionsSpec/proxy-options.json/proxyUsername_without_proxyPassword", + "TestURIOptionsSpec/proxy-options.json/proxyPassword_without_proxyUsername", + "TestURIOptionsSpec/proxy-options.json/multiple_proxyHost_parameters", + "TestURIOptionsSpec/proxy-options.json/multiple_proxyPort_parameters", + "TestURIOptionsSpec/proxy-options.json/multiple_proxyUsername_parameters", + "TestURIOptionsSpec/proxy-options.json/multiple_proxyPassword_parameters", + }, + + // The wtimeoutMS option for write concern is deprecated. + "wtimeoutMS is deprecated": { + "TestURIOptionsSpec/concern-options.json/Valid_read_and_write_concern_are_parsed_correctly", + "TestURIOptionsSpec/concern-options.json/Non-numeric_wTimeoutMS_causes_a_warning", + "TestURIOptionsSpec/concern-options.json/Too_low_wTimeoutMS_causes_a_warning", + "TestReadWriteConcernSpec/connstring/write-concern.json/wtimeoutMS_as_an_invalid_number", + }, + + // Unsupported TLS behavior in connection strings. + "unsupported connstring behavior": { + "TestURIOptionsSpec/tls-options.json/tlsAllowInvalidCertificates_and_tlsDisableCertificateRevocationCheck_both_present_(and_true)_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsAllowInvalidCertificates=true_and_tlsDisableCertificateRevocationCheck=false_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsAllowInvalidCertificates=false_and_tlsDisableCertificateRevocationCheck=true_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsAllowInvalidCertificates_and_tlsDisableCertificateRevocationCheck_both_present_(and_false)_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsDisableCertificateRevocationCheck_and_tlsAllowInvalidCertificates_both_present_(and_true)_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsDisableCertificateRevocationCheck=true_and_tlsAllowInvalidCertificates=false_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsDisableCertificateRevocationCheck=false_and_tlsAllowInvalidCertificates=true_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsDisableCertificateRevocationCheck_and_tlsAllowInvalidCertificates_both_present_(and_false)_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsInsecure_and_tlsDisableCertificateRevocationCheck_both_present_(and_true)_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsInsecure=true_and_tlsDisableCertificateRevocationCheck=false_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsInsecure=false_and_tlsDisableCertificateRevocationCheck=true_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsInsecure_and_tlsDisableCertificateRevocationCheck_both_present_(and_false)_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsDisableCertificateRevocationCheck_and_tlsInsecure_both_present_(and_true)_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsDisableCertificateRevocationCheck=true_and_tlsInsecure=false_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsDisableCertificateRevocationCheck=false_and_tlsInsecure=true_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsDisableCertificateRevocationCheck_and_tlsInsecure_both_present_(and_false)_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsDisableCertificateRevocationCheck_and_tlsDisableOCSPEndpointCheck_both_present_(and_true)_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsDisableCertificateRevocationCheck=true_and_tlsDisableOCSPEndpointCheck=false_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsDisableCertificateRevocationCheck=false_and_tlsDisableOCSPEndpointCheck=true_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsDisableCertificateRevocationCheck_and_tlsDisableOCSPEndpointCheck_both_present_(and_false)_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsDisableOCSPEndpointCheck_and_tlsDisableCertificateRevocationCheck_both_present_(and_true)_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsDisableOCSPEndpointCheck=true_and_tlsDisableCertificateRevocationCheck=false_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsDisableOCSPEndpointCheck=false_and_tlsDisableCertificateRevocationCheck=true_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsDisableOCSPEndpointCheck_and_tlsDisableCertificateRevocationCheck_both_present_(and_false)_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsAllowInvalidCertificates_and_tlsDisableOCSPEndpointCheck_both_present_(and_true)_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsAllowInvalidCertificates=true_and_tlsDisableOCSPEndpointCheck=false_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsAllowInvalidCertificates=false_and_tlsDisableOCSPEndpointCheck=true_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsAllowInvalidCertificates_and_tlsDisableOCSPEndpointCheck_both_present_(and_false)_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsDisableOCSPEndpointCheck_and_tlsAllowInvalidCertificates_both_present_(and_true)_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsDisableOCSPEndpointCheck=true_and_tlsAllowInvalidCertificates=false_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsDisableOCSPEndpointCheck=false_and_tlsAllowInvalidCertificates=true_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsDisableOCSPEndpointCheck_and_tlsAllowInvalidCertificates_both_present_(and_false)_raises_an_error", + "TestURIOptionsSpec/tls-options.json/Invalid_tlsAllowInvalidCertificates_causes_a_warning", + "TestURIOptionsSpec/tls-options.json/tlsAllowInvalidCertificates_is_parsed_correctly", + "TestURIOptionsSpec/tls-options.json/tlsAllowInvalidHostnames_is_parsed_correctly", + "TestURIOptionsSpec/tls-options.json/Invalid_tlsAllowInvalidHostnames_causes_a_warning", + "TestURIOptionsSpec/tls-options.json/tlsInsecure_and_tlsAllowInvalidCertificates_both_present_(and_true)_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsInsecure_and_tlsAllowInvalidCertificates_both_present_(and_false)_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsAllowInvalidCertificates_and_tlsInsecure_both_present_(and_true)_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsAllowInvalidCertificates_and_tlsInsecure_both_present_(and_false)_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsInsecure_and_tlsAllowInvalidHostnames_both_present_(and_true)_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsInsecure_and_tlsAllowInvalidHostnames_both_present_(and_false)_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsAllowInvalidHostnames_and_tlsInsecure_both_present_(and_true)_raises_an_error", + "TestURIOptionsSpec/tls-options.json/tlsAllowInvalidHostnames_and_tlsInsecure_both_present_(and_false)_raises_an_error", + }, + + // TODO(GODRIVER-2991): Make delimiting slash between hosts and options + // optional. + "Requires making delimiting slash between hosts and options optional (GODRIVERS-2991)": { + "TestConnStringSpec/valid-options.json/Missing_delimiting_slash_between_hosts_and_options", + }, + + // Connstring tests violate current Go Driver behavior. + "unsupported behavior": { + "TestURIOptionsSpec/connection-pool-options.json/maxConnecting=0_causes_a_warning", + "TestURIOptionsSpec/single-threaded-options.json/Invalid_serverSelectionTryOnce_causes_a_warning", + "TestConnStringSpec/valid-warnings.json/Empty_integer_option_values_are_ignored", + "TestConnStringSpec/valid-warnings.json/Empty_boolean_option_value_are_ignored", + "TestConnStringSpec/valid-warnings.json/Comma_in_a_key_value_pair_causes_a_warning", + }, + + // TODO(GODRIVER-3167): Support assertions on topologyDescriptionChangedEvent + // in expectEvents. + "Support assertions on topologyDescriptionChangedEvent in expectEvents (GODRIVER-3167)": { + "TestUnifiedSpec/unified-test-format/tests/valid-pass/expectedEventsForClient-topologyDescriptionChangedEvent.json/can_assert_on_values_of_newDescription_and_previousDescription_fields", + }, + + // TODO(GODRIVER-3409): Add regression test for "number" alias in $$type + // operator. + "Regression test for 'number' alias in $$type operator (GODRIVER-3409)": { + "TestUnifiedSpec/unified-test-format/tests/valid-pass/operator-type-number_alias.json/type_number_alias_matches_int32", + "TestUnifiedSpec/unified-test-format/tests/valid-pass/operator-type-number_alias.json/type_number_alias_matches_int64", + "TestUnifiedSpec/unified-test-format/tests/valid-pass/operator-type-number_alias.json/type_number_alias_matches_double", + "TestUnifiedSpec/unified-test-format/tests/valid-pass/operator-type-number_alias.json/type_number_alias_matches_decimal128", + }, + + // TODO(GODRIVER-3143): Convert CRUD v1 spec tests to unified test format. + "Convert CRUD v1 spec tests to unified test format (GODRIVER-3143)": { + "TestUnifiedSpec/crud/tests/unified/bulkWrite-collation.json/BulkWrite_with_delete_operations_and_collation", + "TestUnifiedSpec/crud/tests/unified/count.json/Count_documents_with_skip_and_limit", + "TestUnifiedSpec/crud/tests/unified/findOne.json/FindOne_with_filter,_sort,_and_skip", + }, + + // TODO(GODRIVER-2125): Allow hint for unacknowledged writes using OP_MSG when + // supported by the server. + "Allow hint for unacknowledged writes using OP_MSG (GODRIVER-2125)": { + "TestUnifiedSpec/crud/tests/unified/bulkWrite-deleteMany-hint-unacknowledged.json/Unacknowledged_deleteMany_with_hint_string_on_4.4+_server", + "TestUnifiedSpec/crud/tests/unified/bulkWrite-deleteMany-hint-unacknowledged.json/Unacknowledged_deleteMany_with_hint_document_on_4.4+_server", + "TestUnifiedSpec/crud/tests/unified/bulkWrite-deleteOne-hint-unacknowledged.json/Unacknowledged_deleteOne_with_hint_string_on_4.4+_server", + "TestUnifiedSpec/crud/tests/unified/bulkWrite-deleteOne-hint-unacknowledged.json/Unacknowledged_deleteOne_with_hint_document_on_4.4+_server", + "TestUnifiedSpec/crud/tests/unified/bulkWrite-replaceOne-hint-unacknowledged.json/Unacknowledged_replaceOne_with_hint_string_on_4.2+_server", + "TestUnifiedSpec/crud/tests/unified/bulkWrite-replaceOne-hint-unacknowledged.json/Unacknowledged_replaceOne_with_hint_document_on_4.2+_server", + "TestUnifiedSpec/crud/tests/unified/bulkWrite-updateMany-hint-unacknowledged.json/Unacknowledged_updateMany_with_hint_string_on_4.2+_server", + "TestUnifiedSpec/crud/tests/unified/bulkWrite-updateMany-hint-unacknowledged.json/Unacknowledged_updateMany_with_hint_document_on_4.2+_server", + "TestUnifiedSpec/crud/tests/unified/bulkWrite-updateOne-hint-unacknowledged.json/Unacknowledged_updateOne_with_hint_string_on_4.2+_server", + "TestUnifiedSpec/crud/tests/unified/bulkWrite-updateOne-hint-unacknowledged.json/Unacknowledged_updateOne_with_hint_document_on_4.2+_server", + }, + + // TODO(GODRIVER-3407): Allow drivers to set bypassDocumentValidation: false + // on write commands. + "Allow drivers to set bypassDocumentValidation: false on write commands (GODRIVER-3407)": { + "TestUnifiedSpec/crud/tests/unified/bypassDocumentValidation.json/Aggregate_with_$out_passes_bypassDocumentValidation:_false", + "TestUnifiedSpec/crud/tests/unified/bypassDocumentValidation.json/BulkWrite_passes_bypassDocumentValidation:_false", + "TestUnifiedSpec/crud/tests/unified/bypassDocumentValidation.json/FindOneAndReplace_passes_bypassDocumentValidation:_false", + "TestUnifiedSpec/crud/tests/unified/bypassDocumentValidation.json/FindOneAndUpdate_passes_bypassDocumentValidation:_fals", + "TestUnifiedSpec/crud/tests/unified/bypassDocumentValidation.json/FindOneAndUpdate_passes_bypassDocumentValidation:_false", + "TestUnifiedSpec/crud/tests/unified/bypassDocumentValidation.json/InsertMany_passes_bypassDocumentValidation:_false", + "TestUnifiedSpec/crud/tests/unified/bypassDocumentValidation.json/InsertOne_passes_bypassDocumentValidation:_false", + "TestUnifiedSpec/crud/tests/unified/bypassDocumentValidation.json/ReplaceOne_passes_bypassDocumentValidation:_false", + "TestUnifiedSpec/crud/tests/unified/bypassDocumentValidation.json/UpdateMany_passes_bypassDocumentValidation:_false", + "TestUnifiedSpec/crud/tests/unified/bypassDocumentValidation.json/UpdateOne_passes_bypassDocumentValidation:_false", + "TestUnifiedSpec/crud/tests/unified/deleteMany-hint-unacknowledged.json/Unacknowledged_deleteMany_with_hint_string_on_4.4+_server", + "TestUnifiedSpec/crud/tests/unified/deleteMany-hint-unacknowledged.json/Unacknowledged_deleteMany_with_hint_document_on_4.4+_server", + "TestUnifiedSpec/crud/tests/unified/deleteOne-hint-unacknowledged.json/Unacknowledged_deleteOne_with_hint_string_on_4.4+_server", + "TestUnifiedSpec/crud/tests/unified/deleteOne-hint-unacknowledged.json/Unacknowledged_deleteOne_with_hint_document_on_4.4+_server", + "TestUnifiedSpec/crud/tests/unified/findOneAndDelete-hint-unacknowledged.json/Unacknowledged_findOneAndDelete_with_hint_string_on_4.4+_server", + "TestUnifiedSpec/crud/tests/unified/findOneAndDelete-hint-unacknowledged.json/Unacknowledged_findOneAndDelete_with_hint_document_on_4.4+_server", + "TestUnifiedSpec/crud/tests/unified/findOneAndReplace-hint-unacknowledged.json/Unacknowledged_findOneAndReplace_with_hint_string_on_4.4+_server", + "TestUnifiedSpec/crud/tests/unified/findOneAndReplace-hint-unacknowledged.json/Unacknowledged_findOneAndReplace_with_hint_document_on_4.4+_server", + "TestUnifiedSpec/crud/tests/unified/findOneAndUpdate-hint-unacknowledged.json/Unacknowledged_findOneAndUpdate_with_hint_string_on_4.4+_server", + "TestUnifiedSpec/crud/tests/unified/findOneAndUpdate-hint-unacknowledged.json/Unacknowledged_findOneAndUpdate_with_hint_document_on_4.4+_server", + "TestUnifiedSpec/crud/tests/unified/replaceOne-hint-unacknowledged.json/Unacknowledged_replaceOne_with_hint_string_on_4.2+_server", + "TestUnifiedSpec/crud/tests/unified/replaceOne-hint-unacknowledged.json/Unacknowledged_replaceOne_with_hint_document_on_4.2+_server", + "TestUnifiedSpec/crud/tests/unified/updateMany-hint-unacknowledged.json/Unacknowledged_updateMany_with_hint_string_on_4.2+_server", + "TestUnifiedSpec/crud/tests/unified/updateMany-hint-unacknowledged.json/Unacknowledged_updateMany_with_hint_document_on_4.2+_server", + "TestUnifiedSpec/crud/tests/unified/updateOne-hint-unacknowledged.json/Unacknowledged_updateOne_with_hint_string_on_4.2+_server", + "TestUnifiedSpec/crud/tests/unified/updateOne-hint-unacknowledged.json/Unacknowledged_updateOne_with_hint_document_on_4.2+_server", + }, + + // TODO(GODRIVER-3392): Test that inserts and upserts respect null _id values. + "Test inserts and upserts respect null _id values (GODRIVER-3392)": { + "TestUnifiedSpec/crud/tests/unified/create-null-ids.json/inserting__id_with_type_null_via_insertOne", + "TestUnifiedSpec/crud/tests/unified/create-null-ids.json/inserting__id_with_type_null_via_clientBulkWrite", + }, + + // TODO(GODRIVER-3395): Ensure findOne does not set batchSize=1. + "Ensure findOne does not set batchSize=1 (GODRIVER-3395)": { + "TestUnifiedSpec/crud/tests/unified/find.json/Find_with_batchSize_equal_to_limit", + }, + + // TODO(GODRIVER-2016): Convert transactions spec tests to unified test + // format. + "Convert transactions spec tests to unified test format (GODRIVER-2016)": { + "TestUnifiedSpec/transactions/tests/unified/error-labels.json/do_not_add_UnknownTransactionCommitResult_label_to_MaxTimeMSExpired_inside_transaction", + "TestUnifiedSpec/transactions/tests/unified/error-labels.json/do_not_add_UnknownTransactionCommitResult_label_to_MaxTimeMSExpired_inside_transactions", + "TestUnifiedSpec/transactions/tests/unified/error-labels.json/add_UnknownTransactionCommitResult_label_to_MaxTimeMSExpired", + "TestUnifiedSpec/transactions/tests/unified/error-labels.json/add_UnknownTransactionCommitResult_label_to_writeConcernError_MaxTimeMSExpired", + "TestUnifiedSpec/transactions/tests/unified/retryable-commit.json/commitTransaction_applies_majority_write_concern_on_retries", + "TestUnifiedSpec/transactions/tests/unified/run-command.json/run_command_with_secondary_read_preference_in_client_option_and_primary_read_preference_in_transaction_options", + "TestUnifiedSpec/transactions/tests/unified/transaction-options.json/transaction_options_inherited_from_client", + "TestUnifiedSpec/transactions/tests/unified/transaction-options.json/transaction_options_inherited_from_defaultTransactionOptions", + "TestUnifiedSpec/transactions/tests/unified/transaction-options.json/startTransaction_options_override_defaults", + "TestUnifiedSpec/transactions/tests/unified/transaction-options.json/defaultTransactionOptions_override_client_options", + "TestUnifiedSpec/transactions/tests/unified/transaction-options.json/readConcern_local_in_defaultTransactionOptions", + "TestUnifiedSpec/transactions/tests/unified/transaction-options.json/readPreference_inherited_from_client", + "TestUnifiedSpec/transactions/tests/unified/transaction-options.json/readPreference_inherited_from_defaultTransactionOptions", + "TestUnifiedSpec/transactions/tests/unified/transaction-options.json/startTransaction_overrides_readPreference", + "TestUnifiedSpec/transactions/tests/unified/retryable-commit.json/commitTransaction_fails_after_Interrupted", + "TestUnifiedSpec/transactions-convenient-api/tests/unified/callback-retry.json/callback_is_not_retried_after_non-transient_error_(DuplicateKeyError)", + "TestUnifiedSpec/transactions-convenient-api/tests/unified/callback-retry.json/callback_succeeds_after_multiple_connection_errors", + "TestUnifiedSpec/transactions-convenient-api/tests/unified/commit-retry.json/commitTransaction_retry_only_overwrites_write_concern_w_option", + "TestUnifiedSpec/transactions-convenient-api/tests/unified/commit-retry.json/commit_is_not_retried_after_MaxTimeMSExpired_error", + "TestUnifiedSpec/transactions-convenient-api/tests/unified/commit-writeconcernerror.json/commitTransaction_is_not_retried_after_UnknownReplWriteConcern_error", + "TestUnifiedSpec/transactions-convenient-api/tests/unified/commit-writeconcernerror.json/commitTransaction_is_not_retried_after_UnsatisfiableWriteConcern_error", + "TestUnifiedSpec/transactions-convenient-api/tests/unified/commit-writeconcernerror.json/commitTransaction_is_not_retried_after_MaxTimeMSExpired_error", + }, + + // TODO(GODRIVER-1773): Tests related to batch size expectation in "find" and + // "getMore" events. + "Tests for batch size expectation in 'find' and 'getMore' events (GODRIVER-1773)": { + "TestUnifiedSpec/command-logging-and-monitoring/tests/monitoring/find.json/A_successful_find_event_with_a_getmore_and_the_server_kills_the_cursor_(<=_4.4)", + "TestUnifiedSpec/unified-test-format/tests/valid-pass/poc-command-monitoring.json/A_successful_find_event_with_a_getmore_and_the_server_kills_the_cursor_(<=_4.4)", + }, + + // TODO(GODRIVER-2577): Tests require immediate operation canceling, + // incompatible with current pool clearing logic. + "Require immediate operation canceling for pool clearing (GODRIVER-2577)": { + "TestUnifiedSpec/server-discovery-and-monitoring/tests/unified/interruptInUse-pool-clear.json/Connection_pool_clear_uses_interruptInUseConnections=true_after_monitor_timeout", + "TestUnifiedSpec/server-discovery-and-monitoring/tests/unified/interruptInUse-pool-clear.json/Error_returned_from_connection_pool_clear_with_interruptInUseConnections=true_is_retryable", + "TestUnifiedSpec/server-discovery-and-monitoring/tests/unified/interruptInUse-pool-clear.json/Error_returned_from_connection_pool_clear_with_interruptInUseConnections=true_is_retryable_for_write", + }, // TODO(GODRIVER-2843): Fix and unskip these test cases. - "TestUnifiedSpec/sessions/snapshot-sessions.json/Find_operation_with_snapshot": "Test fails frequently. See GODRIVER-2843", - "TestUnifiedSpec/sessions/snapshot-sessions.json/Write_commands_with_snapshot_session_do_not_affect_snapshot_reads": "Test fails frequently. See GODRIVER-2843", + "Test fails frequently, needs fixing (GODRIVER-2843)": { + "TestUnifiedSpec/sessions/snapshot-sessions.json/Find_operation_with_snapshot", + "TestUnifiedSpec/sessions/snapshot-sessions.json/Write_commands_with_snapshot_session_do_not_affect_snapshot_reads", + }, // TODO(GODRIVER-3043): Avoid Appending Write/Read Concern in Atlas Search // Index Helper Commands. - "TestUnifiedSpec/index-management/searchIndexIgnoresReadWriteConcern.json/dropSearchIndex_ignores_read_and_write_concern": "Sync GODRIVER-3074, but skip testing bug GODRIVER-3043", - "TestUnifiedSpec/index-management/searchIndexIgnoresReadWriteConcern.json/listSearchIndexes_ignores_read_and_write_concern": "Sync GODRIVER-3074, but skip testing bug GODRIVER-3043", - "TestUnifiedSpec/index-management/searchIndexIgnoresReadWriteConcern.json/updateSearchIndex_ignores_the_read_and_write_concern": "Sync GODRIVER-3074, but skip testing bug GODRIVER-3043", - - // TODO(DRIVERS-2829): Create CSOT Legacy Timeout Analogues and - // Compatibility Field - "TestUnifiedSpec/server-discovery-and-monitoring/unified/auth-network-timeout-error.json/Reset_server_and_pool_after_network_timeout_error_during_authentication": "Uses unsupported socketTimeoutMS", - "TestUnifiedSpec/server-discovery-and-monitoring/unified/find-network-timeout-error.json/Ignore_network_timeout_error_on_find": "Uses unsupported socketTimeoutMS", - "TestUnifiedSpec/command-monitoring/find.json/A_successful_find_with_options": "Uses unsupported maxTimeMS", - "TestUnifiedSpec/crud/unified/estimatedDocumentCount.json/estimatedDocumentCount_with_maxTimeMS": "Uses unsupported maxTimeMS", - "TestUnifiedSpec/run-command/runCursorCommand.json/supports_configuring_getMore_maxTimeMS": "Uses unsupported maxTimeMS", + "Sync tests but avoid write/read concern bug (GODRIVER-3043)": { + "TestUnifiedSpec/index-management/tests/searchIndexIgnoresReadWriteConcern.json/dropSearchIndex_ignores_read_and_write_concern", + "TestUnifiedSpec/index-management/tests/searchIndexIgnoresReadWriteConcern.json/listSearchIndexes_ignores_read_and_write_concern", + "TestUnifiedSpec/index-management/tests/searchIndexIgnoresReadWriteConcern.json/updateSearchIndex_ignores_the_read_and_write_concern", + }, - // TODO(GODRIVER-3137): Implement Gossip cluster time" - "TestUnifiedSpec/transactions/unified/mongos-unpin.json/unpin_after_TransientTransactionError_error_on_commit": "Implement GODRIVER-3137", + // TODO(DRIVERS-2829): Create CSOT Legacy Timeout Analogues and Compatibility + // Field. + "Handles socketTimeoutMS instead of CSOT (DRIVERS-2829)": { + "TestUnifiedSpec/server-discovery-and-monitoring/tests/unified/auth-network-timeout-error.json/Reset_server_and_pool_after_network_timeout_error_during_authentication", + "TestUnifiedSpec/server-discovery-and-monitoring/tests/unified/find-network-timeout-error.json/Ignore_network_timeout_error_on_find", + "TestUnifiedSpec/command-logging-and-monitoring/tests/monitoring/find.json/A_successful_find_with_options", + "TestUnifiedSpec/crud/tests/unified/estimatedDocumentCount.json/estimatedDocumentCount_with_maxTimeMS", + "TestUnifiedSpec/run-command/tests/unified/runCursorCommand.json/supports_configuring_getMore_maxTimeMS", + }, // TODO(GODRIVER-3034): Drivers should unpin connections when ending a // session. - "TestUnifiedSpec/transactions/unified/mongos-unpin.json/unpin_on_successful_abort": "Implement GODRIVER-3034", - "TestUnifiedSpec/transactions/unified/mongos-unpin.json/unpin_after_non-transient_error_on_abort": "Implement GODRIVER-3034", - "TestUnifiedSpec/transactions/unified/mongos-unpin.json/unpin_after_TransientTransactionError_error_on_abort": "Implement GODRIVER-3034", - "TestUnifiedSpec/transactions/unified/mongos-unpin.json/unpin_when_a_new_transaction_is_started": "Implement GODRIVER-3034", - "TestUnifiedSpec/transactions/unified/mongos-unpin.json/unpin_when_a_non-transaction_write_operation_uses_a_session": "Implement GODRIVER-3034", - "TestUnifiedSpec/transactions/unified/mongos-unpin.json/unpin_when_a_non-transaction_read_operation_uses_a_session": "Implement GODRIVER-3034", - - // DRIVERS-2722: Setting "maxTimeMS" on a command that creates a cursor also - // limits the lifetime of the cursor. That may be surprising to users, so - // omit "maxTimeMS" from operations that return user-managed cursors. - "TestUnifiedSpec/client-side-operations-timeout/gridfs-find.json/timeoutMS_can_be_overridden_for_a_find": "maxTimeMS is disabled on find and aggregate. See DRIVERS-2722.", - "TestUnifiedSpec/client-side-operations-timeout/override-operation-timeoutMS.json/timeoutMS_can_be_configured_for_an_operation_-_find_on_collection": "maxTimeMS is disabled on find and aggregate. See DRIVERS-2722.", - "TestUnifiedSpec/client-side-operations-timeout/override-operation-timeoutMS.json/timeoutMS_can_be_configured_for_an_operation_-_aggregate_on_collection": "maxTimeMS is disabled on find and aggregate. See DRIVERS-2722.", - "TestUnifiedSpec/client-side-operations-timeout/override-operation-timeoutMS.json/timeoutMS_can_be_configured_for_an_operation_-_aggregate_on_database": "maxTimeMS is disabled on find and aggregate. See DRIVERS-2722.", - "TestUnifiedSpec/client-side-operations-timeout/global-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoClient_-_find_on_collection": "maxTimeMS is disabled on find and aggregate. See DRIVERS-2722.", - "TestUnifiedSpec/client-side-operations-timeout/global-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoClient_-_aggregate_on_collection": "maxTimeMS is disabled on find and aggregate. See DRIVERS-2722.", - "TestUnifiedSpec/client-side-operations-timeout/global-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoClient_-_aggregate_on_database": "maxTimeMS is disabled on find and aggregate. See DRIVERS-2722.", - "TestUnifiedSpec/client-side-operations-timeout/retryability-timeoutMS.json/operation_is_retried_multiple_times_for_non-zero_timeoutMS_-_find_on_collection": "maxTimeMS is disabled on find and aggregate. See DRIVERS-2722.", - "TestUnifiedSpec/client-side-operations-timeout/retryability-timeoutMS.json/operation_is_retried_multiple_times_for_non-zero_timeoutMS_-_aggregate_on_collection": "maxTimeMS is disabled on find and aggregate. See DRIVERS-2722.", - "TestUnifiedSpec/client-side-operations-timeout/retryability-timeoutMS.json/operation_is_retried_multiple_times_for_non-zero_timeoutMS_-_aggregate_on_database": "maxTimeMS is disabled on find and aggregate. See DRIVERS-2722.", - "TestUnifiedSpec/client-side-operations-timeout/gridfs-find.json/timeoutMS_applied_to_find_command": "maxTimeMS is disabled on find and aggregate. See DRIVERS-2722.", - - // DRIVERS-2953: This test requires that the driver sends a "getMore" with - // "maxTimeMS" set. However, "getMore" can only include "maxTimeMS" for - // tailable awaitData cursors. Including "maxTimeMS" on "getMore" for any - // other cursor type results in a server error: - // - // (BadValue) cannot set maxTimeMS on getMore command for a non-awaitData cursor - // - "TestUnifiedSpec/client-side-operations-timeout/runCursorCommand.json/Non-tailable_cursor_lifetime_remaining_timeoutMS_applied_to_getMore_if_timeoutMode_is_unset": "maxTimeMS can't be set on a getMore. See DRIVERS-2953", - - // TODO(GODRIVER-2466): Converting SDAM integration spec tests to unified - // test format requires implementing new test operations, such as - // "recordTopologyDescription". Un-skip whenever GODRIVER-2466 is completed. - "TestUnifiedSpec/server-discovery-and-monitoring/unified/rediscover-quickly-after-step-down.json/Rediscover_quickly_after_replSetStepDown": "Implement GODRIVER-2466", - - // TODO(GODRIVER-2967): The Go Driver doesn't currently emit a - // TopologyChangedEvent when a topology is closed. Un-skip whenever - // GODRIVER-2967 is completed. - "TestUnifiedSpec/server-discovery-and-monitoring/unified/logging-loadbalanced.json/Topology_lifecycle": "Implement GODRIVER-2967", - "TestUnifiedSpec/server-discovery-and-monitoring/unified/logging-sharded.json/Topology_lifecycle": "Implement GODRIVER-2967", - "TestUnifiedSpec/server-discovery-and-monitoring/unified/logging-replicaset.json/Topology_lifecycle": "Implement GODRIVER-2967", - "TestUnifiedSpec/server-discovery-and-monitoring/unified/logging-standalone.json/Topology_lifecycle": "Implement GODRIVER-2967", - "TestUnifiedSpec/server-discovery-and-monitoring/unified/loadbalanced-emit-topology-changed-before-close.json/Topology_lifecycle": "Implement GODRIVER-2967", - "TestUnifiedSpec/server-discovery-and-monitoring/unified/sharded-emit-topology-changed-before-close.json/Topology_lifecycle": "Implement GODRIVER-2967", - "TestUnifiedSpec/server-discovery-and-monitoring/unified/replicaset-emit-topology-changed-before-close.json/Topology_lifecycle": "Implement GODRIVER-2967", - "TestUnifiedSpec/server-discovery-and-monitoring/unified/standalone-emit-topology-changed-before-close.json/Topology_lifecycle": "Implement GODRIVER-2967", + "Unpin connections at session end (GODRIVER-3034)": { + "TestUnifiedSpec/transactions/unified/mongos-unpin.json/unpin_on_successful_abort", + "TestUnifiedSpec/transactions/unified/mongos-unpin.json/unpin_after_non-transient_error_on_abort", + "TestUnifiedSpec/transactions/unified/mongos-unpin.json/unpin_after_TransientTransactionError_error_on_abort", + "TestUnifiedSpec/transactions/unified/mongos-unpin.json/unpin_when_a_new_transaction_is_started", + "TestUnifiedSpec/transactions/unified/mongos-unpin.json/unpin_when_a_non-transaction_write_operation_uses_a_session", + "TestUnifiedSpec/transactions/unified/mongos-unpin.json/unpin_when_a_non-transaction_read_operation_uses_a_session", + }, + + // TODO(GODRIVER-3146): Convert retryable reads spec tests to unified test format. + "Convert retryable reads spec tests to unified test format (GODRIVER-3146)": { + "TestUnifiedSpec/retryable-reads/tests/unified/listCollectionObjects-serverErrors.json/ListCollectionObjects_succeeds_after_InterruptedAtShutdown", + "TestUnifiedSpec/retryable-reads/tests/unified/listCollectionObjects-serverErrors.json/ListCollectionObjects_succeeds_after_InterruptedDueToReplStateChange", + "TestUnifiedSpec/retryable-reads/tests/unified/listCollectionObjects-serverErrors.json/ListCollectionObjects_succeeds_after_NotWritablePrimary", + "TestUnifiedSpec/retryable-reads/tests/unified/listCollectionObjects-serverErrors.json/ListCollectionObjects_succeeds_after_NotPrimaryNoSecondaryOk", + "TestUnifiedSpec/retryable-reads/tests/unified/listCollectionObjects-serverErrors.json/ListCollectionObjects_succeeds_after_NotPrimaryOrSecondary", + "TestUnifiedSpec/retryable-reads/tests/unified/listCollectionObjects-serverErrors.json/ListCollectionObjects_succeeds_after_PrimarySteppedDown", + "TestUnifiedSpec/retryable-reads/tests/unified/listCollectionObjects-serverErrors.json/ListCollectionObjects_succeeds_after_ShutdownInProgress", + "TestUnifiedSpec/retryable-reads/tests/unified/listCollectionObjects-serverErrors.json/ListCollectionObjects_succeeds_after_HostNotFound", + "TestUnifiedSpec/retryable-reads/tests/unified/listCollectionObjects-serverErrors.json/ListCollectionObjects_succeeds_after_HostUnreachable", + "TestUnifiedSpec/retryable-reads/tests/unified/listCollectionObjects-serverErrors.json/ListCollectionObjects_succeeds_after_NetworkTimeout", + "TestUnifiedSpec/retryable-reads/tests/unified/listCollectionObjects-serverErrors.json/ListCollectionObjects_succeeds_after_SocketException", + "TestUnifiedSpec/retryable-reads/tests/unified/listCollectionObjects-serverErrors.json/ListCollectionObjects_fails_after_two_NotWritablePrimary_errors", + "TestUnifiedSpec/retryable-reads/tests/unified/listCollectionObjects-serverErrors.json/ListCollectionObjects_fails_after_NotWritablePrimary_when_retryReads_is_false", + "TestUnifiedSpec/retryable-reads/tests/unified/listCollectionObjects.json/ListCollectionObjects_succeeds_on_first_attempt", + "TestUnifiedSpec/retryable-reads/tests/unified/listCollectionObjects.json/ListCollectionObjects_succeeds_on_second_attempt", + "TestUnifiedSpec/retryable-reads/tests/unified/listCollectionObjects.json/ListCollectionObjects_fails_on_first_attempt", + "TestUnifiedSpec/retryable-reads/tests/unified/listCollectionObjects.json/ListCollectionObjects_fails_on_second_attempt", + "TestUnifiedSpec/retryable-reads/tests/unified/listDatabaseObjects-serverErrors.json/ListDatabaseObjects_succeeds_after_InterruptedAtShutdown", + "TestUnifiedSpec/retryable-reads/tests/unified/listDatabaseObjects-serverErrors.json/ListDatabaseObjects_succeeds_after_InterruptedDueToReplStateChange", + "TestUnifiedSpec/retryable-reads/tests/unified/listDatabaseObjects-serverErrors.json/ListDatabaseObjects_succeeds_after_NotWritablePrimary", + "TestUnifiedSpec/retryable-reads/tests/unified/listDatabaseObjects-serverErrors.json/ListDatabaseObjects_succeeds_after_NotPrimaryNoSecondaryOk", + "TestUnifiedSpec/retryable-reads/tests/unified/listDatabaseObjects-serverErrors.json/ListDatabaseObjects_succeeds_after_NotPrimaryOrSecondary", + "TestUnifiedSpec/retryable-reads/tests/unified/listDatabaseObjects-serverErrors.json/ListDatabaseObjects_succeeds_after_PrimarySteppedDown", + "TestUnifiedSpec/retryable-reads/tests/unified/listDatabaseObjects-serverErrors.json/ListDatabaseObjects_succeeds_after_ShutdownInProgress", + "TestUnifiedSpec/retryable-reads/tests/unified/listDatabaseObjects-serverErrors.json/ListDatabaseObjects_succeeds_after_HostNotFound", + "TestUnifiedSpec/retryable-reads/tests/unified/listDatabaseObjects-serverErrors.json/ListDatabaseObjects_succeeds_after_HostUnreachable", + "TestUnifiedSpec/retryable-reads/tests/unified/listDatabaseObjects-serverErrors.json/ListDatabaseObjects_succeeds_after_NetworkTimeout", + "TestUnifiedSpec/retryable-reads/tests/unified/listDatabaseObjects-serverErrors.json/ListDatabaseObjects_succeeds_after_SocketException", + "TestUnifiedSpec/retryable-reads/tests/unified/listDatabaseObjects-serverErrors.json/ListDatabaseObjects_fails_after_two_NotWritablePrimary_errors", + "TestUnifiedSpec/retryable-reads/tests/unified/listDatabaseObjects-serverErrors.json/ListDatabaseObjects_fails_after_NotWritablePrimary_when_retryReads_is_false", + "TestUnifiedSpec/retryable-reads/tests/unified/listDatabaseObjects.json/ListDatabaseObjects_succeeds_on_first_attempt", + "TestUnifiedSpec/retryable-reads/tests/unified/listDatabaseObjects.json/ListDatabaseObjects_succeeds_on_second_attempt", + "TestUnifiedSpec/retryable-reads/tests/unified/listDatabaseObjects.json/ListDatabaseObjects_fails_on_first_attempt", + "TestUnifiedSpec/retryable-reads/tests/unified/listDatabaseObjects.json/ListDatabaseObjects_fails_on_second_attempt", + "TestUnifiedSpec/retryable-reads/tests/unified/mapReduce.json/MapReduce_succeeds_with_retry_on", + "TestUnifiedSpec/retryable-reads/tests/unified/mapReduce.json/MapReduce_fails_with_retry_on", + "TestUnifiedSpec/retryable-reads/tests/unified/mapReduce.json/MapReduce_fails_with_retry_off", + }, + + // TODO(GODRIVER-2944): Setting "maxTimeMS" on a command that creates a cursor + // may be surprising to users, so omit this from operations that return + // user-managed cursors. + "Omit maxTimeMS from user-managed cursor operations (DRIVERS-2722)": { + "TestUnifiedSpec/client-side-operations-timeout/tests/gridfs-find.json/timeoutMS_can_be_overridden_for_a_find", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-operation-timeoutMS.json/timeoutMS_can_be_configured_for_an_operation_-_find_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-operation-timeoutMS.json/timeoutMS_can_be_configured_for_an_operation_-_aggregate_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-operation-timeoutMS.json/timeoutMS_can_be_configured_for_an_operation_-_aggregate_on_database", + "TestUnifiedSpec/client-side-operations-timeout/tests/global-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoClient_-_find_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/global-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoClient_-_aggregate_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/global-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoClient_-_aggregate_on_database", + "TestUnifiedSpec/client-side-operations-timeout/tests/retryability-timeoutMS.json/operation_is_retried_multiple_times_for_non-zero_timeoutMS_-_find_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/retryability-timeoutMS.json/operation_is_retried_multiple_times_for_non-zero_timeoutMS_-_aggregate_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/retryability-timeoutMS.json/operation_is_retried_multiple_times_for_non-zero_timeoutMS_-_aggregate_on_database", + "TestUnifiedSpec/client-side-operations-timeout/tests/gridfs-find.json/timeoutMS_applied_to_find_command", + }, + + // TODO(GODRIVER-3411): Tests require "getMore" with "maxTimeMS" settings. Not + // supported for non-awaitData cursors. + "Omit maxTimeMS from a getMore (DRIVERS-2953)": { + "TestUnifiedSpec/client-side-operations-timeout/runCursorCommand.json/Non-tailable_cursor_lifetime_remaining_timeoutMS_applied_to_getMore_if_timeoutMode_is_unset", + }, + + // TODO(GODRIVER-2466): Convert SDAM integration spec tests to unified test format. + "Convert SDAM integration tests to unified format (GODRIVER-2466)": { + "TestUnifiedSpec/server-discovery-and-monitoring/tests/unified/rediscover-quickly-after-step-down.json/Rediscover_quickly_after_replSetStepDown", + }, + + // TODO(GODRIVER-2967): Implement TopologyChangedEvent on topology close. + "Implement TopologyChangedEvent on close (GODRIVER-2967)": { + "TestUnifiedSpec/server-discovery-and-monitoring/tests/unified/logging-loadbalanced.json/Topology_lifecycle", + "TestUnifiedSpec/server-discovery-and-monitoring/tests/unified/logging-sharded.json/Topology_lifecycle", + "TestUnifiedSpec/server-discovery-and-monitoring/tests/unified/logging-replicaset.json/Topology_lifecycle", + "TestUnifiedSpec/server-discovery-and-monitoring/tests/unified/logging-standalone.json/Topology_lifecycle", + "TestUnifiedSpec/server-discovery-and-monitoring/tests/unified/loadbalanced-emit-topology-changed-before-close.json/Topology_lifecycle", + "TestUnifiedSpec/server-discovery-and-monitoring/tests/unified/sharded-emit-topology-changed-before-close.json/Topology_lifecycle", + "TestUnifiedSpec/server-discovery-and-monitoring/tests/unified/replicaset-emit-topology-changed-before-close.json/Topology_lifecycle", + "TestUnifiedSpec/server-discovery-and-monitoring/tests/unified/standalone-emit-topology-changed-before-close.json/Topology_lifecycle", + }, + + // Unknown BSON format. + "Unsupported format": { + "TestBsonBinaryVectorSpec/Tests_of_Binary_subtype_9,_Vectors,_with_dtype_FLOAT32/Infinity_Vector_FLOAT32/Marshaling", + "TestBsonBinaryVectorSpec/Tests_of_Binary_subtype_9,_Vectors,_with_dtype_FLOAT32/Infinity_Vector_FLOAT32/Unmarshaling", + }, + + // Unsupported BSON binary vector tests. + "compile-time restriction": { + "TestBsonBinaryVectorSpec/Tests_of_Binary_subtype_9,_Vectors,_with_dtype_PACKED_BIT/Overflow_Vector_PACKED_BIT/Marshaling", + "TestBsonBinaryVectorSpec/Tests_of_Binary_subtype_9,_Vectors,_with_dtype_INT8/Underflow_Vector_INT8/Marshaling", + "TestBsonBinaryVectorSpec/Tests_of_Binary_subtype_9,_Vectors,_with_dtype_INT8/Overflow_Vector_INT8/Marshaling", + "TestBsonBinaryVectorSpec/Tests_of_Binary_subtype_9,_Vectors,_with_dtype_PACKED_BIT/Negative_padding_PACKED_BIT/Marshaling", + "TestBsonBinaryVectorSpec/Tests_of_Binary_subtype_9,_Vectors,_with_dtype_PACKED_BIT/Vector_with_float_values_PACKED_BIT/Marshaling", + "TestBsonBinaryVectorSpec/Tests_of_Binary_subtype_9,_Vectors,_with_dtype_PACKED_BIT/Underflow_Vector_PACKED_BIT/Marshaling", + "TestBsonBinaryVectorSpec/Tests_of_Binary_subtype_9,_Vectors,_with_dtype_INT8/INT8_with_float_inputs/Marshaling", + }, + + // Unsupported BSON binary vector padding. + "private padding field": { + "TestBsonBinaryVectorSpec/Tests_of_Binary_subtype_9,_Vectors,_with_dtype_INT8/INT8_with_padding/Marshaling", + "TestBsonBinaryVectorSpec/Tests_of_Binary_subtype_9,_Vectors,_with_dtype_FLOAT32/FLOAT32_with_padding/Marshaling", + }, + + // Invalid BSON vector cases. + "invalid case": { + "TestBsonBinaryVectorSpec/Tests_of_Binary_subtype_9,_Vectors,_with_dtype_FLOAT32/Insufficient_vector_data_with_3_bytes_FLOAT32/Marshaling", + "TestBsonBinaryVectorSpec/Tests_of_Binary_subtype_9,_Vectors,_with_dtype_FLOAT32/Insufficient_vector_data_with_5_bytes_FLOAT32/Marshaling", + }, + + // TODO(GODRIVER-3521): Extend Legacy Unified Spec Runner to include + // client-side-encryption timeoutMS. + "Extend Legacy Unified Spec Runner for client-side-encryption timeoutMS (GODRIVER-3521)": { + "TestClientSideEncryptionSpec/timeoutMS.json/remaining_timeoutMS_applied_to_find_to_get_keyvault_data", + "TestClientSideEncryptionSpec/timeoutMS.json/timeoutMS_applied_to_listCollections_to_get_collection_schema", + }, + + // TODO(GODRIVER-3486): Support auto encryption in unified tests. + "Support auto encryption in unified tests (GODRIVER-3486)": { + "TestUnifiedSpec/unified-test-format/tests/valid-pass/poc-queryable-encryption.json/insert,_replace,_and_find_with_queryable_encryption", + }, + + // TODO(DRIVERS-3106): Support auto encryption in unified tests. + "Support auto encryption in unified tests (DRIVERS-3106)": { + "TestUnifiedSpec/client-side-encryption/tests/unified/localSchema.json/A_local_schema_should_override", + "TestUnifiedSpec/client-side-encryption/tests/unified/localSchema.json/A_local_schema_with_no_encryption_is_an_error", + "TestUnifiedSpec/client-side-encryption/tests/unified/fle2v2-BypassQueryAnalysis.json/BypassQueryAnalysis_decrypts", + "TestUnifiedSpec/client-side-encryption/tests/unified/fle2v2-EncryptedFields-vs-EncryptedFieldsMap.json/encryptedFieldsMap_is_preferred_over_remote_encryptedFields", + }, + + // TODO(GODRIVER-3076): CSFLE/QE Support for more than 1 KMS provider per + // type. + "Support multiple KMS providers per type (GODRIVER-3076)": { + "TestUnifiedSpec/client-side-encryption/tests/unified/namedKMS-createDataKey.json/create_datakey_with_named_Azure_KMS_provider", + "TestUnifiedSpec/client-side-encryption/tests/unified/namedKMS-createDataKey.json/create_datakey_with_named_GCP_KMS_provider", + "TestUnifiedSpec/client-side-encryption/tests/unified/namedKMS-createDataKey.json/create_datakey_with_named_KMIP_KMS_provider", + "TestUnifiedSpec/client-side-encryption/tests/unified/namedKMS-createDataKey.json/create_datakey_with_named_local_KMS_provider", + "TestUnifiedSpec/client-side-encryption/tests/unified/namedKMS-explicit.json/can_explicitly_encrypt_with_a_named_KMS_provider", + "TestUnifiedSpec/client-side-encryption/tests/unified/namedKMS-explicit.json/can_explicitly_decrypt_with_a_named_KMS_provider", + "TestUnifiedSpec/client-side-encryption/tests/unified/namedKMS-rewrapManyDataKey.json/rewrap_to_aws:name1", + "TestUnifiedSpec/client-side-encryption/tests/unified/namedKMS-rewrapManyDataKey.json/rewrap_to_azure:name1", + "TestUnifiedSpec/client-side-encryption/tests/unified/namedKMS-rewrapManyDataKey.json/rewrap_to_gcp:name1", + "TestUnifiedSpec/client-side-encryption/tests/unified/namedKMS-rewrapManyDataKey.json/rewrap_to_kmip:name1", + "TestUnifiedSpec/client-side-encryption/tests/unified/namedKMS-rewrapManyDataKey.json/rewrap_to_local:name1", + "TestUnifiedSpec/client-side-encryption/tests/unified/namedKMS-rewrapManyDataKey.json/rewrap_from_local:name1_to_local:name2", + "TestUnifiedSpec/client-side-encryption/tests/unified/namedKMS-rewrapManyDataKey.json/rewrap_from_aws:name1_to_aws:name2", + "TestUnifiedSpec/client-side-encryption/tests/unified/namedKMS-createDataKey.json/create_data_key_with_named_AWS_KMS_provider", + "TestClientSideEncryptionSpec/namedKMS.json/Automatically_encrypt_and_decrypt_with_a_named_KMS_provider", + }, + + // TODO(GODRIVER-3380): Change stream should resume with CSOT failure. + "Ensure change streams resume with CSOT failure (GODRIVER-3380)": { + "TestUnifiedSpec/client-side-operations-timeout/tests/change-streams.json/timeoutMS_is_refreshed_for_getMore_if_maxAwaitTimeMS_is_not_set", + "TestUnifiedSpec/client-side-operations-timeout/tests/change-streams.json/timeoutMS_is_refreshed_for_getMore_if_maxAwaitTimeMS_is_set", + "TestUnifiedSpec/client-side-operations-timeout/tests/change-streams.json/timeoutMS_applies_to_full_resume_attempt_in_a_next_call", + "TestUnifiedSpec/client-side-operations-timeout/tests/change-streams.json/change_stream_can_be_iterated_again_if_previous_iteration_times_out", + "TestUnifiedSpec/client-side-operations-timeout/tests/change-streams.json/timeoutMS_is_refreshed_for_getMore_-_failure", + "TestUnifiedSpec/client-side-operations-timeout/tests/change-streams.json/error_if_maxAwaitTimeMS_is_greater_than_timeoutMS", + "TestUnifiedSpec/client-side-operations-timeout/tests/change-streams.json/error_if_maxAwaitTimeMS_is_equal_to_timeoutMS", + }, + + // Unknown CSOT: + "CSOT test not implemented": { + "TestUnifiedSpec/client-side-operations-timeout/tests/close-cursors.json/timeoutMS_is_refreshed_for_close", + "TestUnifiedSpec/client-side-operations-timeout/tests/convenient-transactions.json/withTransaction_raises_a_client-side_error_if_timeoutMS_is_overridden_inside_the_callback", + "TestUnifiedSpec/client-side-operations-timeout/tests/convenient-transactions.json/timeoutMS_is_not_refreshed_for_each_operation_in_the_callback", + "TestUnifiedSpec/client-side-operations-timeout/tests/cursors.json/find_errors_if_timeoutMode_is_set_and_timeoutMS_is_not", + "TestUnifiedSpec/client-side-operations-timeout/tests/cursors.json/collection_aggregate_errors_if_timeoutMode_is_set_and_timeoutMS_is_not", + "TestUnifiedSpec/client-side-operations-timeout/tests/cursors.json/database_aggregate_errors_if_timeoutMode_is_set_and_timeoutMS_is_not", + "TestUnifiedSpec/client-side-operations-timeout/tests/cursors.json/listCollections_errors_if_timeoutMode_is_set_and_timeoutMS_is_not", + "TestUnifiedSpec/client-side-operations-timeout/tests/cursors.json/listIndexes_errors_if_timeoutMode_is_set_and_timeoutMS_is_not", + "TestUnifiedSpec/client-side-operations-timeout/tests/non-tailable-cursors.json/timeoutMS_applied_to_find_if_timeoutMode_is_cursor_lifetime", + "TestUnifiedSpec/client-side-operations-timeout/tests/non-tailable-cursors.json/remaining_timeoutMS_applied_to_getMore_if_timeoutMode_is_unset", + "TestUnifiedSpec/client-side-operations-timeout/tests/non-tailable-cursors.json/remaining_timeoutMS_applied_to_getMore_if_timeoutMode_is_cursor_lifetime", + "TestUnifiedSpec/client-side-operations-timeout/tests/non-tailable-cursors.json/timeoutMS_applied_to_find_if_timeoutMode_is_iteration", + "TestUnifiedSpec/client-side-operations-timeout/tests/non-tailable-cursors.json/timeoutMS_is_refreshed_for_getMore_if_timeoutMode_is_iteration_-_success", + "TestUnifiedSpec/client-side-operations-timeout/tests/non-tailable-cursors.json/timeoutMS_is_refreshed_for_getMore_if_timeoutMode_is_iteration_-_failure", + "TestUnifiedSpec/client-side-operations-timeout/tests/non-tailable-cursors.json/aggregate_with_$out_errors_if_timeoutMode_is_iteration", + "TestUnifiedSpec/client-side-operations-timeout/tests/non-tailable-cursors.json/aggregate_with_$merge_errors_if_timeoutMode_is_iteration", + "TestUnifiedSpec/client-side-operations-timeout/tests/gridfs-download.json/timeoutMS_applied_to_find_to_get_chunks", + "TestUnifiedSpec/client-side-operations-timeout/tests/gridfs-download.json/timeoutMS_applied_to_entire_download,_not_individual_parts", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoCollection_-_aggregate_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoCollection_-_aggregate_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoCollection_-_count_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoCollection_-_count_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoCollection_-_countDocuments_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoCollection_-_countDocuments_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoCollection_-_estimatedDocumentCount_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoCollection_-_estimatedDocumentCount_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoCollection_-_distinct_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoCollection_-_distinct_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoCollection_-_find_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoCollection_-_find_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoCollection_-_findOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoCollection_-_findOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoCollection_-_listIndexes_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoCollection_-_listIndexes_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoCollection_-_listIndexNames_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoCollection_-_listIndexNames_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoCollection_-_createChangeStream_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoCollection_-_createChangeStream_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoCollection_-_insertOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoCollection_-_insertOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoCollection_-_insertMany_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoCollection_-_insertMany_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoCollection_-_deleteOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoCollection_-_deleteOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoCollection_-_deleteMany_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoCollection_-_deleteMany_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoCollection_-_replaceOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoCollection_-_replaceOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoCollection_-_updateOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoCollection_-_updateOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoCollection_-_updateMany_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoCollection_-_updateMany_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoCollection_-_findOneAndDelete_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoCollection_-_findOneAndDelete_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoCollection_-_findOneAndReplace_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoCollection_-_findOneAndReplace_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoCollection_-_findOneAndUpdate_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoCollection_-_findOneAndUpdate_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoCollection_-_bulkWrite_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoCollection_-_bulkWrite_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoCollection_-_createIndex_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoCollection_-_createIndex_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoCollection_-_dropIndex_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoCollection_-_dropIndex_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoCollection_-_dropIndexes_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-collection-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoCollection_-_dropIndexes_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_aggregate_on_database", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_aggregate_on_database", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_listCollections_on_database", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_listCollections_on_database", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_listCollectionNames_on_database", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_listCollectionNames_on_database", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_runCommand_on_database", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_runCommand_on_database", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_createChangeStream_on_database", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_createChangeStream_on_database", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_aggregate_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_aggregate_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_count_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_count_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_countDocuments_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_countDocuments_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_estimatedDocumentCount_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_estimatedDocumentCount_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_distinct_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_distinct_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_find_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_find_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_findOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_findOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_listIndexes_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_listIndexes_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_listIndexNames_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_listIndexNames_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_createChangeStream_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_createChangeStream_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_insertOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_insertOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_insertMany_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_insertMany_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_deleteOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_deleteOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_deleteMany_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_deleteMany_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_replaceOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_replaceOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_updateOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_updateOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_updateMany_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_updateMany_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_findOneAndDelete_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_findOneAndDelete_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_findOneAndReplace_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_findOneAndReplace_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_findOneAndUpdate_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_findOneAndUpdate_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_bulkWrite_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_bulkWrite_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_createIndex_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_createIndex_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_dropIndex_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_dropIndex_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_configured_on_a_MongoDatabase_-_dropIndexes_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/override-database-timeoutMS.json/timeoutMS_can_be_set_to_0_on_a_MongoDatabase_-_dropIndexes_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/sessions-inherit-timeoutMS.json/timeoutMS_applied_to_commitTransaction", + "TestUnifiedSpec/client-side-operations-timeout/tests/sessions-inherit-timeoutMS.json/timeoutMS_applied_to_abortTransaction", + "TestUnifiedSpec/client-side-operations-timeout/tests/sessions-inherit-timeoutMS.json/timeoutMS_applied_to_withTransaction", + "TestUnifiedSpec/client-side-operations-timeout/tests/sessions-override-operation-timeoutMS.json/timeoutMS_applied_to_withTransaction", + "TestUnifiedSpec/client-side-operations-timeout/tests/sessions-override-timeoutMS.json", + "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-awaitData.json/error_if_timeoutMode_is_cursor_lifetime", + "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-awaitData.json/error_if_maxAwaitTimeMS_is_greater_than_timeoutMS", + "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-awaitData.json/error_if_maxAwaitTimeMS_is_equal_to_timeoutMS", + "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-awaitData.json/timeoutMS_applied_to_find", + "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-awaitData.json/timeoutMS_is_refreshed_for_getMore_if_maxAwaitTimeMS_is_not_set", + "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-awaitData.json/timeoutMS_is_refreshed_for_getMore_if_maxAwaitTimeMS_is_set", + "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-awaitData.json/timeoutMS_is_refreshed_for_getMore_-_failure", + "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-awaitData.json/apply_remaining_timeoutMS_if_less_than_maxAwaitTimeMS", + "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-awaitData.json/apply_maxAwaitTimeMS_if_less_than_remaining_timeout", + "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-non-awaitData.json/error_if_timeoutMode_is_cursor_lifetime", + "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-non-awaitData.json/timeoutMS_applied_to_find", + "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-non-awaitData.json/timeoutMS_is_refreshed_for_getMore_-_success", + "TestUnifiedSpec/client-side-operations-timeout/tests/tailable-non-awaitData.json/timeoutMS_is_refreshed_for_getMore_-_failure", + }, + + "CSOT deprecated options test skipped": { + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/commitTransaction_ignores_socketTimeoutMS_if_timeoutMS_is_set", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/commitTransaction_ignores_wTimeoutMS_if_timeoutMS_is_set", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/commitTransaction_ignores_maxCommitTimeMS_if_timeoutMS_is_set", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/abortTransaction_ignores_socketTimeoutMS_if_timeoutMS_is_set", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/abortTransaction_ignores_wTimeoutMS_if_timeoutMS_is_set", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/withTransaction_ignores_socketTimeoutMS_if_timeoutMS_is_set", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/withTransaction_ignores_wTimeoutMS_if_timeoutMS_is_set", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/withTransaction_ignores_maxCommitTimeMS_if_timeoutMS_is_set", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_listDatabases_on_client", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_listDatabases_on_client", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_listDatabaseNames_on_client", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_listDatabaseNames_on_client", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_createChangeStream_on_client", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_createChangeStream_on_client", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_aggregate_on_database", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_aggregate_on_database", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/maxTimeMS_is_ignored_if_timeoutMS_is_set_-_aggregate_on_database", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_listCollections_on_database", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_listCollections_on_database", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_listCollectionNames_on_database", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_listCollectionNames_on_database", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_runCommand_on_database", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_runCommand_on_database", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_createChangeStream_on_database", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_createChangeStream_on_database", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_aggregate_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_aggregate_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/maxTimeMS_is_ignored_if_timeoutMS_is_set_-_aggregate_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_count_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_count_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/maxTimeMS_is_ignored_if_timeoutMS_is_set_-_count_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_countDocuments_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_countDocuments_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_estimatedDocumentCount_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_estimatedDocumentCount_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/maxTimeMS_is_ignored_if_timeoutMS_is_set_-_estimatedDocumentCount_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_distinct_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_distinct_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/maxTimeMS_is_ignored_if_timeoutMS_is_set_-_distinct_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_find_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_find_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/maxTimeMS_is_ignored_if_timeoutMS_is_set_-_find_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_findOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_findOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/maxTimeMS_is_ignored_if_timeoutMS_is_set_-_findOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_listIndexes_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_listIndexes_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_listIndexNames_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_listIndexNames_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_createChangeStream_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_createChangeStream_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_insertOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_insertOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_insertMany_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_insertMany_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_deleteOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_deleteOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_deleteMany_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_deleteMany_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_replaceOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_replaceOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_updateOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_updateOne_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_updateMany_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_updateMany_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_findOneAndDelete_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_findOneAndDelete_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/maxTimeMS_is_ignored_if_timeoutMS_is_set_-_findOneAndDelete_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_findOneAndReplace_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_findOneAndReplace_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/maxTimeMS_is_ignored_if_timeoutMS_is_set_-_findOneAndReplace_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_findOneAndUpdate_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_findOneAndUpdate_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/maxTimeMS_is_ignored_if_timeoutMS_is_set_-_findOneAndUpdate_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_bulkWrite_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_bulkWrite_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_createIndex_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_createIndex_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/maxTimeMS_is_ignored_if_timeoutMS_is_set_-_createIndex_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_dropIndex_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_dropIndex_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/maxTimeMS_is_ignored_if_timeoutMS_is_set_-_dropIndex_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/socketTimeoutMS_is_ignored_if_timeoutMS_is_set_-_dropIndexes_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/wTimeoutMS_is_ignored_if_timeoutMS_is_set_-_dropIndexes_on_collection", + "TestUnifiedSpec/client-side-operations-timeout/tests/deprecated-options.json/maxTimeMS_is_ignored_if_timeoutMS_is_set_-_dropIndexes_on_collection", + }, + + "Go Driver does not support legacy CSOT": { + "TestUnifiedSpec/client-side-operations-timeout/tests/legacy-timeouts.json/wTimeoutMS_is_not_used_to_derive_a_maxTimeMS_command_field", + "TestUnifiedSpec/client-side-operations-timeout/tests/legacy-timeouts.json/maxTimeMS_option_is_used_directly_as_the_maxTimeMS_field_on_a_command", + "TestUnifiedSpec/client-side-operations-timeout/tests/legacy-timeouts.json/maxCommitTimeMS_option_is_used_directly_as_the_maxTimeMS_field_on_a_commitTransaction_command", + }, + + // TODO(GODRIVER-3106): "hello" failpoint in CSOT command-execution UST is premature. + "Address premature 'hello' failpoint in CSOT command-execution (GODRIVER-3106)": { + "TestUnifiedSpec/client-side-operations-timeout/tests/command-execution.json/maxTimeMS_value_in_the_command_is_less_than_timeoutMS", + }, + + // TODO(GODRIVER-3415): Add performant "rename all revisions by filename" + // feature - rename_by_name. + "Add performant 'rename all revisions by filename' feature (GODRIVER-3415)": { + "TestUnifiedSpec/gridfs/tests/deleteByName.json/delete_when_multiple_revisions_of_the_file_exist", + "TestUnifiedSpec/gridfs/tests/deleteByName.json/delete_when_file_name_does_not_exist", + "TestUnifiedSpec/gridfs/tests/renameByName.json/rename_when_multiple_revisions_of_the_file_exist", + "TestUnifiedSpec/gridfs/tests/renameByName.json/rename_when_file_name_does_not_exist", + }, + + // TODO(GODRIVER-3393): Add test that PoolClearedEvent is emitted before + // ConnectionCheckedInEvent/ConnectionCheckOutFailedEvent. + "Ensure PoolClearedEvent is emitted before ConnectionCheckedIn/ConnectionCheckOutFailed (GODRIVER-3393)": { + "TestUnifiedSpec/server-discovery-and-monitoring/tests/unified/pool-clear-checkout-error.json/Pool_is_cleared_before_connection_is_closed_(authentication_error)", + "TestUnifiedSpec/server-discovery-and-monitoring/tests/unified/pool-clear-checkout-error.json/Pool_is_cleared_before_connection_is_closed_(handshake_error)", + "TestUnifiedSpec/server-discovery-and-monitoring/tests/unified/pool-clear-min-pool-size-error.json/Pool_is_cleared_on_authentication_error_during_minPoolSize_population", + "TestUnifiedSpec/server-discovery-and-monitoring/tests/unified/pool-clear-min-pool-size-error.json/Pool_is_cleared_on_handshake_error_during_minPoolSize_population", + }, + + // TODO(GODRIVER-3155): Convert read/write concern spec tests to unified test + // format. + "Convert read/write concern spec tests to unified format (GODRIVER-3155)": { + "TestUnifiedSpecs/read-write-concern/tests/operation/default-write-concern-2.6.json", + "TestUnifiedSpecs/read-write-concern/tests/operation/default-write-concern-3.2.json", + "TestUnifiedSpecs/read-write-concern/tests/operation/default-write-concern-3.4.json", + "TestUnifiedSpecs/read-write-concern/tests/operation/default-write-concern-4.2.json", + }, + + // TODO(GODRIVER-2191): Drivers should retry operations if connection + // handshake fails. + "Retry operations on handshake failure (GODRIVER-2191)": { + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/client.listDatabases_succeeds_after_retryable_handshake_network_error", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/client.listDatabases_succeeds_after_retryable_handshake_server_error_(ShutdownInProgress)", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/client.listDatabaseNames_succeeds_after_retryable_handshake_network_error", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/client.listDatabaseNames_succeeds_after_retryable_handshake_server_error_(ShutdownInProgress)", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/client.createChangeStream_succeeds_after_retryable_handshake_network_error", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/client.createChangeStream_succeeds_after_retryable_handshake_server_error_(ShutdownInProgress)", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/database.aggregate_succeeds_after_retryable_handshake_network_error", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/database.aggregate_succeeds_after_retryable_handshake_server_error_(ShutdownInProgress)", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/database.listCollections_succeeds_after_retryable_handshake_network_error", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/database.listCollections_succeeds_after_retryable_handshake_server_error_(ShutdownInProgress)", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/database.listCollectionNames_succeeds_after_retryable_handshake_network_error", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/database.listCollectionNames_succeeds_after_retryable_handshake_server_error_(ShutdownInProgress)", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/database.createChangeStream_succeeds_after_retryable_handshake_network_error", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/database.createChangeStream_succeeds_after_retryable_handshake_server_error_(ShutdownInProgress)", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/collection.aggregate_succeeds_after_retryable_handshake_network_error", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/collection.aggregate_succeeds_after_retryable_handshake_server_error_(ShutdownInProgress)", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/collection.countDocuments_succeeds_after_retryable_handshake_network_error", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/collection.countDocuments_succeeds_after_retryable_handshake_server_error_(ShutdownInProgress)", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/collection.estimatedDocumentCount_succeeds_after_retryable_handshake_network_error", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/collection.estimatedDocumentCount_succeeds_after_retryable_handshake_server_error_(ShutdownInProgress)", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/collection.distinct_succeeds_after_retryable_handshake_network_error", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/collection.distinct_succeeds_after_retryable_handshake_server_error_(ShutdownInProgress)", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/collection.find_succeeds_after_retryable_handshake_network_error", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/collection.find_succeeds_after_retryable_handshake_server_error_(ShutdownInProgress)", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/collection.findOne_succeeds_after_retryable_handshake_network_error", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/collection.findOne_succeeds_after_retryable_handshake_server_error_(ShutdownInProgress)", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/collection.listIndexes_succeeds_after_retryable_handshake_network_error", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/collection.listIndexes_succeeds_after_retryable_handshake_server_error_(ShutdownInProgress)", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/collection.createChangeStream_succeeds_after_retryable_handshake_network_error", + "TestUnifiedSpec/retryable-reads/tests/unified/handshakeError.json/collection.createChangeStream_succeeds_after_retryable_handshake_server_error_(ShutdownInProgress)", + "TestUnifiedSpec/retryable-writes/tests/unified/handshakeError.json", + "TestUnifiedSpec/retryable-writes/tests/unified/handshakeError.json/client.clientBulkWrite_succeeds_after_retryable_handshake_network_error", + "TestUnifiedSpec/retryable-writes/tests/unified/handshakeError.json/client.clientBulkWrite_succeeds_after_retryable_handshake_server_error_(ShutdownInProgress)", + "TestUnifiedSpec/retryable-writes/tests/unified/handshakeError.json/collection.insertOne_succeeds_after_retryable_handshake_network_error", + "TestUnifiedSpec/retryable-writes/tests/unified/handshakeError.json/collection.insertOne_succeeds_after_retryable_handshake_server_error_(ShutdownInProgress)", + "TestUnifiedSpec/retryable-writes/tests/unified/handshakeError.json/collection.insertMany_succeeds_after_retryable_handshake_network_error", + "TestUnifiedSpec/retryable-writes/tests/unified/handshakeError.json/collection.insertMany_succeeds_after_retryable_handshake_server_error_(ShutdownInProgress)", + "TestUnifiedSpec/retryable-writes/tests/unified/handshakeError.json/collection.deleteOne_succeeds_after_retryable_handshake_network_error", + "TestUnifiedSpec/retryable-writes/tests/unified/handshakeError.json/collection.deleteOne_succeeds_after_retryable_handshake_server_error_(ShutdownInProgress)", + "TestUnifiedSpec/retryable-writes/tests/unified/handshakeError.json/collection.replaceOne_succeeds_after_retryable_handshake_network_error", + "TestUnifiedSpec/retryable-writes/tests/unified/handshakeError.json/collection.replaceOne_succeeds_after_retryable_handshake_server_error_(ShutdownInProgress)", + "TestUnifiedSpec/retryable-writes/tests/unified/handshakeError.json/collection.updateOne_succeeds_after_retryable_handshake_network_error", + "TestUnifiedSpec/retryable-writes/tests/unified/handshakeError.json/collection.updateOne_succeeds_after_retryable_handshake_server_error_(ShutdownInProgress)", + "TestUnifiedSpec/retryable-writes/tests/unified/handshakeError.json/collection.findOneAndDelete_succeeds_after_retryable_handshake_network_error", + "TestUnifiedSpec/retryable-writes/tests/unified/handshakeError.json/collection.findOneAndDelete_succeeds_after_retryable_handshake_server_error_(ShutdownInProgress)", + "TestUnifiedSpec/retryable-writes/tests/unified/handshakeError.json/collection.findOneAndReplace_succeeds_after_retryable_handshake_network_error", + "TestUnifiedSpec/retryable-writes/tests/unified/handshakeError.json/collection.findOneAndReplace_succeeds_after_retryable_handshake_server_error_(ShutdownInProgress)", + "TestUnifiedSpec/retryable-writes/tests/unified/handshakeError.json/collection.findOneAndUpdate_succeeds_after_retryable_handshake_network_error", + "TestUnifiedSpec/retryable-writes/tests/unified/handshakeError.json/collection.findOneAndUpdate_succeeds_after_retryable_handshake_server_error_(ShutdownInProgress)", + "TestUnifiedSpec/retryable-writes/tests/unified/handshakeError.json/collection.bulkWrite_succeeds_after_retryable_handshake_network_error", + "TestUnifiedSpec/retryable-writes/tests/unified/handshakeError.json/collection.bulkWrite_succeeds_after_retryable_handshake_server_error_(ShutdownInProgress)", + }, + + // TODO(GODRIVER-3524): Change streams expanded events present by default in + // 8.2+. + "Change streams expanded events for MongoDB 8.2+ (GODRIVER-3524)": { + "TestUnifiedSpec/change-streams/change-streams-disambiguatedPaths.json/disambiguatedPaths_is_not_present_when_showExpandedEvents_is_false/unset", + "TestUnifiedSpec/change-streams/change-streams.json/Test_insert,_update,_replace,_and_delete_event_types", + }, + + // TODO(DRIVERS-3153): Re-enable once resolved. + "Re-enable test following DRIVERS-3153 resolution (DRIVERS-3153)": { + "TestUnifiedSpec/atlas-data-lake-testing/tests/unified/getMore.json/A_successful_find_event_with_getMore", + }, + + // TODO(GODRIVER-3137): Gossip cluster time from internal MongoClient to + // session entities. + "Must advance cluster times in unified spec runner (GODRIVER-3137)": { + "TestUnifiedSpec/transactions/unified/mongos-unpin.json/unpin_after_TransientTransactionError_error_on_commit", + // This test fails with the same error as GODRIVER-3137, but is not + // directly referenced as an impacted test case by DRIVERS-2816. It + // seems likely that the same change will resolve the failure, so I'm + // including it here. + "TestUnifiedSpec/unified-test-format/tests/valid-pass/poc-transactions-convenient-api.json/withTransaction_and_no_transaction_options_set", + "TestUnifiedSpec/unified-test-format/tests/valid-pass/poc-transactions-convenient-api.json/withTransaction_inherits_transaction_options_from_client", + "TestUnifiedSpec/unified-test-format/tests/valid-pass/poc-transactions-convenient-api.json/withTransaction_inherits_transaction_options_from_defaultTransactionOptions", + "TestUnifiedSpec/unified-test-format/tests/valid-pass/poc-transactions-convenient-api.json/withTransaction_explicit_transaction_options", + "TestUnifiedSpec/unified-test-format/tests/valid-pass/poc-transactions-mongos-pin-auto.json/remain_pinned_after_non-transient_Interrupted_error_on_insertOne", + "TestUnifiedSpec/unified-test-format/tests/valid-pass/poc-transactions-mongos-pin-auto.json/unpin_after_transient_error_within_a_transaction", + "TestUnifiedSpec/transactions-convenient-api/tests/unified/callback-aborts.json/withTransaction_succeeds_if_callback_aborts", + "TestUnifiedSpec/transactions-convenient-api/tests/unified/callback-commits.json/withTransaction_succeeds_if_callback_commits", + "TestUnifiedSpec/transactions-convenient-api/tests/unified/callback-commits.json/withTransaction_still_succeeds_if_callback_commits_and_runs_extra_op", + "TestUnifiedSpec/transactions-convenient-api/tests/unified/callback-aborts.json/withTransaction_still_succeeds_if_callback_aborts_and_runs_extra_op", + "TestUnifiedSpec/transactions-convenient-api/tests/unified/commit.json/withTransaction_commits_after_callback_returns_(second_transaction)", + "TestUnifiedSpec/transactions-convenient-api/tests/unified/transaction-options.json/withTransaction_and_no_transaction_options_set", + "TestUnifiedSpec/transactions-convenient-api/tests/unified/transaction-options.json/withTransaction_inherits_transaction_options_from_client", + "TestUnifiedSpec/transactions-convenient-api/tests/unified/transaction-options.json/withTransaction_inherits_transaction_options_from_defaultTransactionOptions", + "TestUnifiedSpec/transactions-convenient-api/tests/unified/transaction-options.json/withTransaction_explicit_transaction_options", + "TestUnifiedSpec/transactions-convenient-api/tests/unified/transaction-options.json/withTransaction_explicit_transaction_options_override_defaultTransactionOptions", + "TestUnifiedSpec/transactions-convenient-api/tests/unified/transaction-options.json/withTransaction_explicit_transaction_options_override_client_options", + "TestUnifiedSpec/transactions-convenient-api/tests/unified/commit.json/withTransaction_commits_after_callback_returns", + }, } -// CheckSkip checks if the fully-qualified test name matches a skipped test -// name. If the test name matches, the reason is logged and the test is skipped. +// CheckSkip checks if the fully-qualified test name matches a list of skipped test names for a given reason. +// If the test name matches any from a list, the reason is logged and the test is skipped. func CheckSkip(t *testing.T) { - if reason := skipTests[t.Name()]; reason != "" { - t.Skipf("Skipping due to known failure: %q", reason) + for reason, tests := range skipTests { + for _, testName := range tests { + if t.Name() == testName { + t.Skipf("Skipping due to known failure: %q", reason) + } + } } } diff --git a/internal/spectest/spectest.go b/internal/spectest/spectest.go index 363b072c2c..416d9b618b 100644 --- a/internal/spectest/spectest.go +++ b/internal/spectest/spectest.go @@ -7,8 +7,10 @@ package spectest import ( - "io/ioutil" + "os" "path" + "path/filepath" + "runtime" "testing" "go.mongodb.org/mongo-driver/v2/internal/require" @@ -20,7 +22,7 @@ func FindJSONFilesInDir(t *testing.T, dir string) []string { files := make([]string, 0) - entries, err := ioutil.ReadDir(dir) + entries, err := os.ReadDir(dir) require.NoError(t, err) for _, entry := range entries { @@ -31,5 +33,30 @@ func FindJSONFilesInDir(t *testing.T, dir string) []string { files = append(files, entry.Name()) } + if len(files) == 0 { + t.Fatalf("no JSON files found in %q", dir) + } + return files } + +// Path returns the absolute path to the given specifications repo file or +// subdirectory. +// +// If the PROJECT_DIRECTORY environment variable is set, Path uses that to find +// the repo root path. Otherwise, it falls back to using the call stack to find +// the repo root path. Path panics if it can't find the repo root path. +func Path(subdir string) string { + root := os.Getenv("PROJECT_DIRECTORY") + if root == "" { + _, file, _, ok := runtime.Caller(0) + if !ok { + panic("unable to get current file path from call stack") + } + + // Get the repository root path from the current Go file path. + root = filepath.Dir(filepath.Dir(filepath.Dir(file))) + } + + return filepath.Join(root, "testdata", "specifications", "source", subdir) +} diff --git a/mongo/read_write_concern_spec_test.go b/mongo/read_write_concern_spec_test.go index c7a1256113..5118cc511d 100644 --- a/mongo/read_write_concern_spec_test.go +++ b/mongo/read_write_concern_spec_test.go @@ -16,6 +16,7 @@ import ( "go.mongodb.org/mongo-driver/v2/bson" "go.mongodb.org/mongo-driver/v2/internal/assert" + "go.mongodb.org/mongo-driver/v2/internal/spectest" "go.mongodb.org/mongo-driver/v2/mongo/readconcern" "go.mongodb.org/mongo-driver/v2/mongo/writeconcern" "go.mongodb.org/mongo-driver/v2/x/bsonx/bsoncore" @@ -24,9 +25,8 @@ import ( ) const ( - readWriteConcernTestsDir = "../testdata/read-write-concern" - connstringTestsDir = "connection-string" - documentTestsDir = "document" + connstringTestsDir = "connection-string" + documentTestsDir = "document" ) var ( @@ -36,6 +36,7 @@ var ( reg.RegisterTypeMapEntry(bson.TypeEmbeddedDocument, reflect.TypeOf(bson.Raw{})) return reg }() + readWriteConcernTestsDir = spectest.Path("read-write-concern/tests") ) type connectionStringTestFile struct { @@ -48,7 +49,6 @@ type connectionStringTest struct { Valid bool `bson:"valid"` ReadConcern bson.Raw `bson:"readConcern"` WriteConcern bson.Raw `bson:"writeConcern"` - SkipReason string `bson:"skipReason"` } type documentTestFile struct { @@ -103,9 +103,7 @@ func runConnectionStringTestFile(t *testing.T, filePath string) { } func runConnectionStringTest(t *testing.T, test connectionStringTest) { - if test.SkipReason != "" { - t.Skip(test.SkipReason) - } + spectest.CheckSkip(t) cs, err := connstring.ParseAndValidate(test.URI) if !test.Valid { diff --git a/testdata/specifications b/testdata/specifications new file mode 160000 index 0000000000..7891688772 --- /dev/null +++ b/testdata/specifications @@ -0,0 +1 @@ +Subproject commit 78916887729bf0d3088541bd9a7390770fae5f77 diff --git a/x/mongo/driver/auth/auth_spec_test.go b/x/mongo/driver/auth/auth_spec_test.go index 1530cc3a74..fa2036fde5 100644 --- a/x/mongo/driver/auth/auth_spec_test.go +++ b/x/mongo/driver/auth/auth_spec_test.go @@ -38,7 +38,7 @@ type testContainer struct { } // Note a test supporting the deprecated gssapiServiceName property was removed from data/auth/auth_tests.json -const authTestsDir = "../../../../testdata/auth/" +var authTestsDir = spectest.Path("auth/tests/legacy") func runTestsInFile(t *testing.T, dirname string, filename string) { filepath := path.Join(dirname, filename) diff --git a/x/mongo/driver/connstring/connstring_spec_test.go b/x/mongo/driver/connstring/connstring_spec_test.go index 037e3ac94a..f2fff93c49 100644 --- a/x/mongo/driver/connstring/connstring_spec_test.go +++ b/x/mongo/driver/connstring/connstring_spec_test.go @@ -47,8 +47,8 @@ type testContainer struct { Tests []testCase } -const connstringTestsDir = "../../../../testdata/connection-string/" -const urioptionsTestDir = "../../../../testdata/uri-options/" +var connstringTestsDir = spectest.Path("connection-string/tests") +var urioptionsTestDir = spectest.Path("uri-options/tests") func (h *host) toString() string { switch h.Type { @@ -102,22 +102,8 @@ func runTestsInFile(t *testing.T, dirname string, filename string, warningsError }) } -var skipKeywords = []string{ - "tlsAllowInvalidHostnames", - "tlsAllowInvalidCertificates", - "tlsDisableCertificateRevocationCheck", - "serverSelectionTryOnce", - - // GODRIVER-2348: the wtimeoutMS write concern option is not supported. - "wTimeoutMS", -} - func runTest(t *testing.T, test testCase, warningsError bool) { - for _, keyword := range skipKeywords { - if strings.Contains(test.Description, keyword) { - t.Skipf("skipping because keyword %s", keyword) - } - } + spectest.CheckSkip(t) cs, err := connstring.ParseAndValidate(test.URI) // Since we don't have warnings in Go, we return warnings as errors. @@ -163,7 +149,7 @@ func runTest(t *testing.T, test testCase, warningsError bool) { // for options that are present. var ok bool - _, ok = test.Options["maxpoolsize"] + _, ok = test.Options["maxPoolSize"] require.Equal(t, ok, cs.MaxPoolSizeSet) } @@ -220,13 +206,13 @@ func verifyConnStringOptions(t *testing.T, cs *connstring.ConnString, options ma require.Equal(t, value, float64(cs.MaxConnIdleTime/time.Millisecond)) case "maxpoolsize": require.True(t, cs.MaxPoolSizeSet) - require.Equal(t, value, cs.MaxPoolSize) + require.Equal(t, value, float64(cs.MaxPoolSize)) case "maxstalenessseconds": require.True(t, cs.MaxStalenessSet) require.Equal(t, value, float64(cs.MaxStaleness/time.Second)) case "minpoolsize": require.True(t, cs.MinPoolSizeSet) - require.Equal(t, value, int64(cs.MinPoolSize)) + require.Equal(t, value, float64(cs.MinPoolSize)) case "readpreference": require.Equal(t, value, cs.ReadPreference) case "readpreferencetags": @@ -285,6 +271,10 @@ func verifyConnStringOptions(t *testing.T, cs *connstring.ConnString, options ma require.Equal(t, value, cs.SSLDisableOCSPEndpointCheck) case "servermonitoringmode": require.Equal(t, value, cs.ServerMonitoringMode) + case "timeoutms": + require.Equal(t, value, float64(cs.Timeout/time.Millisecond)) + case "maxconnecting": + require.Equal(t, value, float64(cs.MaxConnecting)) default: opt, ok := cs.UnknownOptions[key] require.True(t, ok) diff --git a/x/mongo/driver/topology/CMAP_spec_test.go b/x/mongo/driver/topology/CMAP_spec_test.go index c0ff65d3ff..6f23eaa36e 100644 --- a/x/mongo/driver/topology/CMAP_spec_test.go +++ b/x/mongo/driver/topology/CMAP_spec_test.go @@ -114,7 +114,7 @@ type testInfo struct { sync.Mutex } -const cmapTestDir = "../../../../testdata/connection-monitoring-and-pooling/" +var cmapTestDir = spectest.Path("connection-monitoring-and-pooling/tests/cmap-format") func TestCMAPSpec(t *testing.T) { for _, testFileName := range spectest.FindJSONFilesInDir(t, cmapTestDir) { diff --git a/x/mongo/driver/topology/sdam_spec_test.go b/x/mongo/driver/topology/sdam_spec_test.go index 6c190dda13..f17eb4a2d8 100644 --- a/x/mongo/driver/topology/sdam_spec_test.go +++ b/x/mongo/driver/topology/sdam_spec_test.go @@ -203,7 +203,7 @@ func serverClosed(e *event.ServerClosedEvent) { lock.Unlock() } -const testsDir string = "../../../../testdata/server-discovery-and-monitoring/" +var testsDir = spectest.Path("server-discovery-and-monitoring/tests") var publishedEvents []interface{} var lock sync.Mutex diff --git a/x/mongo/driver/topology/server_rtt_test.go b/x/mongo/driver/topology/server_rtt_test.go index 1152653501..7c842867fe 100644 --- a/x/mongo/driver/topology/server_rtt_test.go +++ b/x/mongo/driver/topology/server_rtt_test.go @@ -27,7 +27,7 @@ func TestServerSelectionRTTSpec(t *testing.T) { NewAvgRtt float64 `json:"new_avg_rtt"` } - const testsDir string = "../../../../testdata/server-selection/rtt" + testsDir := spectest.Path("server-selection/tests/rtt") for _, file := range spectest.FindJSONFilesInDir(t, testsDir) { func(t *testing.T, filename string) { diff --git a/x/mongo/driver/topology/topology_test.go b/x/mongo/driver/topology/topology_test.go index 205030f1e8..b95c84fc54 100644 --- a/x/mongo/driver/topology/topology_test.go +++ b/x/mongo/driver/topology/topology_test.go @@ -808,7 +808,7 @@ type inWindowTestCase struct { // can't be effectively accomplished just with server descriptions like most other server selection // algorithms. func TestServerSelectionSpecInWindow(t *testing.T) { - const testsDir = "../../../../testdata/server-selection/in_window" + testsDir := spectest.Path("server-selection/tests/in_window") files := spectest.FindJSONFilesInDir(t, testsDir)