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