Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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: "*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"schemaVersion": "1.1",
"runOnRequirements": [
{
"minServerVersion": "4.7",
"minServerVersion": "4.9",
"serverParameters": {
"requireApiVersion": false
}
Expand Down
4 changes: 2 additions & 2 deletions test/versioned-api/test-commands-deprecation-errors.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"schemaVersion": "1.1",
"runOnRequirements": [
{
"minServerVersion": "4.7",
"minServerVersion": "4.9",
"serverParameters": {
"enableTestCommands": true,
"acceptAPIVersion2": true,
"acceptApiVersion2": true,
"requireApiVersion": false
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/versioned-api/test-commands-strict-mode.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"schemaVersion": "1.1",
"runOnRequirements": [
{
"minServerVersion": "4.7",
"minServerVersion": "4.9",
"serverParameters": {
"enableTestCommands": true
}
Expand Down
135 changes: 133 additions & 2 deletions test/versioned-api/transaction-handling.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"schemaVersion": "1.1",
"runOnRequirements": [
{
"minServerVersion": "4.7",
"minServerVersion": "4.9",
"topologies": [
"replicaset",
"sharded-replicaset"
Expand Down Expand Up @@ -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
}
}
}
}
]
}
]
}
]
}