forked from mongodb/mongo-php-library
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip Sync converted transaction spec tests
POC for mongodb/specifications#1502
- Loading branch information
Showing
37 changed files
with
32,835 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
426 changes: 426 additions & 0 deletions
426
tests/UnifiedSpecTests/transactions/causal-consistency.json
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.