| 1 |
runOn: |
| 2 |
|
| 3 |
- |
| 4 |
minServerVersion: "4.0.2" |
| 5 |
topology: ["replicaset"] |
| 6 |
- |
| 7 |
minServerVersion: "4.1.8" |
| 8 |
topology: ["sharded"] |
| 9 |
|
| 10 |
database_name: &database_name "transaction-tests" |
| 11 |
collection_name: &collection_name "test" |
| 12 |
|
| 13 |
data: &data |
| 14 |
- {_id: 1} |
| 15 |
- {_id: 2} |
| 16 |
- {_id: 3} |
| 17 |
- {_id: 4} |
| 18 |
|
| 19 |
tests: |
| 20 |
- description: count |
| 21 |
|
| 22 |
operations: |
| 23 |
- name: startTransaction |
| 24 |
object: session0 |
| 25 |
- name: count |
| 26 |
object: collection |
| 27 |
arguments: |
| 28 |
session: session0 |
| 29 |
filter: |
| 30 |
_id: 1 |
| 31 |
result: |
| 32 |
errorCodeName: OperationNotSupportedInTransaction |
| 33 |
errorLabelsOmit: ["TransientTransactionError", "UnknownTransactionCommitResult"] |
| 34 |
- name: abortTransaction |
| 35 |
object: session0 |
| 36 |
|
| 37 |
expectations: |
| 38 |
- command_started_event: |
| 39 |
command: |
| 40 |
count: *collection_name |
| 41 |
query: |
| 42 |
_id: 1 |
| 43 |
readConcern: |
| 44 |
lsid: session0 |
| 45 |
txnNumber: |
| 46 |
$numberLong: "1" |
| 47 |
startTransaction: true |
| 48 |
autocommit: false |
| 49 |
writeConcern: |
| 50 |
command_name: count |
| 51 |
database_name: *database_name |
| 52 |
- command_started_event: |
| 53 |
command: |
| 54 |
abortTransaction: 1 |
| 55 |
lsid: session0 |
| 56 |
txnNumber: |
| 57 |
$numberLong: "1" |
| 58 |
startTransaction: |
| 59 |
autocommit: false |
| 60 |
writeConcern: |
| 61 |
command_name: abortTransaction |
| 62 |
database_name: admin |
| 63 |
|
| 64 |
outcome: |
| 65 |
collection: |
| 66 |
data: |
| 67 |
*data |