diff --git a/.evergreen/config.yml b/.evergreen/config.yml index c678535fd4..b77ed0d382 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -1944,11 +1944,11 @@ axes: REQUIRE_API_VERSION: "1" # MONGODB_API_VERSION is the apiVersion to use in the test suite. MONGODB_API_VERSION: "1" - # Test against a cluster with acceptAPIVersion2 but without + # Test against a cluster with acceptApiVersion2 but without # requireApiVersion, and don't automatically add apiVersion to # clients created in the test suite. - - id: "acceptAPIVersion2" - display_name: "acceptAPIVersion2" + - id: "acceptApiVersion2" + display_name: "acceptApiVersion2" tags: [ "versionedApi_tag" ] variables: ORCHESTRATION_FILE: "versioned-api-testing.json" @@ -2434,7 +2434,7 @@ buildvariants: - matrix_name: "versioned-api-tests" matrix_spec: - platform: ubuntu-16.04 + platform: ubuntu-18.04 python-version: ["3.6", "3.9"] auth: "auth" versionedApi: "*" diff --git a/test/versioned-api/runcommand-helper-no-api-version-declared.json b/test/versioned-api/runcommand-helper-no-api-version-declared.json index 65c24ef460..e901887e4c 100644 --- a/test/versioned-api/runcommand-helper-no-api-version-declared.json +++ b/test/versioned-api/runcommand-helper-no-api-version-declared.json @@ -3,7 +3,7 @@ "schemaVersion": "1.1", "runOnRequirements": [ { - "minServerVersion": "4.7", + "minServerVersion": "4.9", "serverParameters": { "requireApiVersion": false } diff --git a/test/versioned-api/test-commands-deprecation-errors.json b/test/versioned-api/test-commands-deprecation-errors.json index bdbc3f92ce..0668df830a 100644 --- a/test/versioned-api/test-commands-deprecation-errors.json +++ b/test/versioned-api/test-commands-deprecation-errors.json @@ -3,10 +3,10 @@ "schemaVersion": "1.1", "runOnRequirements": [ { - "minServerVersion": "4.7", + "minServerVersion": "4.9", "serverParameters": { "enableTestCommands": true, - "acceptAPIVersion2": true, + "acceptApiVersion2": true, "requireApiVersion": false } } diff --git a/test/versioned-api/test-commands-strict-mode.json b/test/versioned-api/test-commands-strict-mode.json index ebace44319..1705ba7bff 100644 --- a/test/versioned-api/test-commands-strict-mode.json +++ b/test/versioned-api/test-commands-strict-mode.json @@ -3,7 +3,7 @@ "schemaVersion": "1.1", "runOnRequirements": [ { - "minServerVersion": "4.7", + "minServerVersion": "4.9", "serverParameters": { "enableTestCommands": true } diff --git a/test/versioned-api/transaction-handling.json b/test/versioned-api/transaction-handling.json index 64e9706b5e..a740405d3a 100644 --- a/test/versioned-api/transaction-handling.json +++ b/test/versioned-api/transaction-handling.json @@ -3,7 +3,7 @@ "schemaVersion": "1.1", "runOnRequirements": [ { - "minServerVersion": "4.7", + "minServerVersion": "4.9", "topologies": [ "replicaset", "sharded-replicaset" @@ -382,7 +382,138 @@ ] } ] + }, + { + "description": "abortTransaction does not include an API version", + "runOnRequirements": [ + { + "topologies": [ + "replicaset", + "sharded-replicaset" + ] + } + ], + "operations": [ + { + "name": "startTransaction", + "object": "session" + }, + { + "name": "insertOne", + "object": "collection", + "arguments": { + "session": "session", + "document": { + "_id": 6, + "x": 66 + } + }, + "expectResult": { + "$$unsetOrMatches": { + "insertedId": { + "$$unsetOrMatches": 6 + } + } + } + }, + { + "name": "insertOne", + "object": "collection", + "arguments": { + "session": "session", + "document": { + "_id": 7, + "x": 77 + } + }, + "expectResult": { + "$$unsetOrMatches": { + "insertedId": { + "$$unsetOrMatches": 7 + } + } + } + }, + { + "name": "abortTransaction", + "object": "session" + } + ], + "expectEvents": [ + { + "client": "client", + "events": [ + { + "commandStartedEvent": { + "command": { + "insert": "test", + "documents": [ + { + "_id": 6, + "x": 66 + } + ], + "lsid": { + "$$sessionLsid": "session" + }, + "startTransaction": true, + "apiVersion": "1", + "apiStrict": { + "$$unsetOrMatches": false + }, + "apiDeprecationErrors": { + "$$unsetOrMatches": false + } + } + } + }, + { + "commandStartedEvent": { + "command": { + "insert": "test", + "documents": [ + { + "_id": 7, + "x": 77 + } + ], + "lsid": { + "$$sessionLsid": "session" + }, + "apiVersion": { + "$$exists": false + }, + "apiStrict": { + "$$exists": false + }, + "apiDeprecationErrors": { + "$$exists": false + } + } + } + }, + { + "commandStartedEvent": { + "command": { + "abortTransaction": 1, + "lsid": { + "$$sessionLsid": "session" + }, + "apiVersion": { + "$$exists": false + }, + "apiStrict": { + "$$exists": false + }, + "apiDeprecationErrors": { + "$$exists": false + } + } + } + } + ] + } + ] } ] } -