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 7, 2024
1 parent b4a3007 commit 3ad8843
Show file tree
Hide file tree
Showing 37 changed files with 32,835 additions and 0 deletions.
834 changes: 834 additions & 0 deletions tests/UnifiedSpecTests/transactions/abort.json

Large diffs are not rendered by default.

658 changes: 658 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.

183 changes: 183 additions & 0 deletions tests/UnifiedSpecTests/transactions/count.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
{
"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"
}
},
{
"session": {
"id": "session1",
"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
}
]
}
]
}
]
}
Loading

0 comments on commit 3ad8843

Please sign in to comment.