Skip to content

Commit

Permalink
wip Sync converted transaction spec tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jmikola committed Feb 8, 2024
1 parent 96cfcad commit 1aa9514
Show file tree
Hide file tree
Showing 35 changed files with 32,669 additions and 0 deletions.
828 changes: 828 additions & 0 deletions tests/UnifiedSpecTests/transactions/abort.json

Large diffs are not rendered by default.

652 changes: 652 additions & 0 deletions tests/UnifiedSpecTests/transactions/bulk.json

Large diffs are not rendered by default.

426 changes: 426 additions & 0 deletions tests/UnifiedSpecTests/transactions/causal-consistency.json

Large diffs are not rendered by default.

1,234 changes: 1,234 additions & 0 deletions tests/UnifiedSpecTests/transactions/commit.json

Large diffs are not rendered by default.

177 changes: 177 additions & 0 deletions tests/UnifiedSpecTests/transactions/count.json
@@ -0,0 +1,177 @@
{
"description": "count",
"schemaVersion": "1.3",
"runOnRequirements": [
{
"minServerVersion": "4.0.2",
"topologies": [
"replicaset"
]
},
{
"minServerVersion": "4.1.8",
"topologies": [
"sharded",
"load-balanced"
]
}
],
"createEntities": [
{
"client": {
"id": "client0",
"useMultipleMongoses": false,
"observeEvents": [
"commandStartedEvent"
]
}
},
{
"database": {
"id": "database0",
"client": "client0",
"databaseName": "transaction-tests"
}
},
{
"collection": {
"id": "collection0",
"database": "database0",
"collectionName": "test"
}
},
{
"session": {
"id": "session0",
"client": "client0"
}
}
],
"initialData": [
{
"collectionName": "test",
"databaseName": "transaction-tests",
"documents": [
{
"_id": 1
},
{
"_id": 2
},
{
"_id": 3
},
{
"_id": 4
}
]
}
],
"tests": [
{
"description": "count",
"operations": [
{
"object": "session0",
"name": "startTransaction"
},
{
"object": "collection0",
"name": "count",
"arguments": {
"session": "session0",
"filter": {
"_id": 1
}
},
"expectError": {
"errorCodeName": "OperationNotSupportedInTransaction",
"errorLabelsOmit": [
"TransientTransactionError",
"UnknownTransactionCommitResult"
]
}
},
{
"object": "session0",
"name": "abortTransaction"
}
],
"expectEvents": [
{
"client": "client0",
"events": [
{
"commandStartedEvent": {
"command": {
"count": "test",
"query": {
"_id": 1
},
"readConcern": {
"$$exists": false
},
"lsid": {
"$$sessionLsid": "session0"
},
"txnNumber": {
"$numberLong": "1"
},
"startTransaction": true,
"autocommit": false,
"writeConcern": {
"$$exists": false
}
},
"commandName": "count",
"databaseName": "transaction-tests"
}
},
{
"commandStartedEvent": {
"command": {
"abortTransaction": 1,
"lsid": {
"$$sessionLsid": "session0"
},
"txnNumber": {
"$numberLong": "1"
},
"startTransaction": {
"$$exists": false
},
"autocommit": false,
"writeConcern": {
"$$exists": false
}
},
"commandName": "abortTransaction",
"databaseName": "admin"
}
}
]
}
],
"outcome": [
{
"collectionName": "test",
"databaseName": "transaction-tests",
"documents": [
{
"_id": 1
},
{
"_id": 2
},
{
"_id": 3
},
{
"_id": 4
}
]
}
]
}
]
}

0 comments on commit 1aa9514

Please sign in to comment.