Skip to content

Commit

Permalink
CSHARP-2753: Avoid using readConcern snapshot in sharded transaction …
Browse files Browse the repository at this point in the history
…tests
  • Loading branch information
vincentkam committed Sep 30, 2019
1 parent 8f5fada commit 6e438c0
Show file tree
Hide file tree
Showing 8 changed files with 354 additions and 326 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
"session0": {
"defaultTransactionOptions": {
"readConcern": {
"level": "snapshot"
"level": "majority"
},
"writeConcern": {
"w": 1
Expand Down Expand Up @@ -243,7 +243,7 @@
"startTransaction": true,
"autocommit": false,
"readConcern": {
"level": "snapshot"
"level": "majority"
},
"writeConcern": null
},
Expand Down Expand Up @@ -308,7 +308,7 @@
},
"options": {
"readConcern": {
"level": "snapshot"
"level": "majority"
},
"writeConcern": {
"w": 1
Expand All @@ -335,7 +335,7 @@
"startTransaction": true,
"autocommit": false,
"readConcern": {
"level": "snapshot"
"level": "majority"
},
"writeConcern": null
},
Expand Down Expand Up @@ -380,7 +380,7 @@
"session0": {
"defaultTransactionOptions": {
"readConcern": {
"level": "majority"
"level": "snapshot"
},
"writeConcern": {
"w": "majority"
Expand Down Expand Up @@ -412,7 +412,7 @@
},
"options": {
"readConcern": {
"level": "snapshot"
"level": "majority"
},
"writeConcern": {
"w": 1
Expand All @@ -439,7 +439,7 @@
"startTransaction": true,
"autocommit": false,
"readConcern": {
"level": "snapshot"
"level": "majority"
},
"writeConcern": null
},
Expand Down Expand Up @@ -481,7 +481,7 @@
"description": "withTransaction explicit transaction options override client options",
"useMultipleMongoses": true,
"clientOptions": {
"readConcernLevel": "majority",
"readConcernLevel": "local",
"w": "majority"
},
"operations": [
Expand All @@ -508,7 +508,7 @@
},
"options": {
"readConcern": {
"level": "snapshot"
"level": "majority"
},
"writeConcern": {
"w": 1
Expand All @@ -535,7 +535,7 @@
"startTransaction": true,
"autocommit": false,
"readConcern": {
"level": "snapshot"
"level": "majority"
},
"writeConcern": null
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ tests:
sessionOptions:
session0:
defaultTransactionOptions:
readConcern: { level: snapshot }
readConcern: { level: majority }
writeConcern: { w: 1 }
operations: *operations
expectations:
Expand All @@ -123,7 +123,7 @@ tests:
txnNumber: { $numberLong: "1" }
startTransaction: true
autocommit: false
readConcern: { level: snapshot }
readConcern: { level: majority }
# omitted fields
writeConcern: ~
command_name: insert
Expand Down Expand Up @@ -161,7 +161,7 @@ tests:
result:
insertedId: 1
options:
readConcern: { level: snapshot }
readConcern: { level: majority }
writeConcern: { w: 1 }
expectations:
-
Expand All @@ -175,7 +175,7 @@ tests:
txnNumber: { $numberLong: "1" }
startTransaction: true
autocommit: false
readConcern: { level: snapshot }
readConcern: { level: majority }
# omitted fields
writeConcern: ~
command_name: insert
Expand All @@ -200,7 +200,7 @@ tests:
sessionOptions:
session0:
defaultTransactionOptions:
readConcern: { level: majority }
readConcern: { level: snapshot }
writeConcern: { w: majority }
operations: *operations_explicit_transactionOptions
expectations:
Expand All @@ -215,7 +215,7 @@ tests:
txnNumber: { $numberLong: "1" }
startTransaction: true
autocommit: false
readConcern: { level: snapshot }
readConcern: { level: majority }
# omitted fields
writeConcern: ~
command_name: insert
Expand All @@ -238,7 +238,7 @@ tests:
description: withTransaction explicit transaction options override client options
useMultipleMongoses: true
clientOptions:
readConcernLevel: majority
readConcernLevel: local
w: majority
operations: *operations_explicit_transactionOptions
expectations:
Expand All @@ -253,7 +253,7 @@ tests:
txnNumber: { $numberLong: "1" }
startTransaction: true
autocommit: false
readConcern: { level: snapshot }
readConcern: { level: majority }
# omitted fields
writeConcern: ~
command_name: insert
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"arguments": {
"options": {
"readConcern": {
"level": "snapshot"
"level": "majority"
}
}
}
Expand Down Expand Up @@ -110,7 +110,7 @@
"cursor": {},
"lsid": "session0",
"readConcern": {
"level": "snapshot"
"level": "majority"
},
"txnNumber": {
"$numberLong": "1"
Expand Down Expand Up @@ -202,7 +202,7 @@
"arguments": {
"options": {
"readConcern": {
"level": "snapshot"
"level": "majority"
}
}
}
Expand Down Expand Up @@ -274,7 +274,7 @@
"batchSize": 3,
"lsid": "session0",
"readConcern": {
"level": "snapshot"
"level": "majority"
},
"txnNumber": {
"$numberLong": "1"
Expand Down Expand Up @@ -389,7 +389,7 @@
"arguments": {
"options": {
"readConcern": {
"level": "snapshot"
"level": "majority"
}
}
}
Expand Down Expand Up @@ -484,7 +484,7 @@
},
"lsid": "session0",
"readConcern": {
"level": "snapshot"
"level": "majority"
},
"txnNumber": {
"$numberLong": "1"
Expand Down Expand Up @@ -608,7 +608,7 @@
"arguments": {
"options": {
"readConcern": {
"level": "snapshot"
"level": "majority"
}
}
}
Expand Down Expand Up @@ -664,7 +664,7 @@
"key": "_id",
"lsid": "session0",
"readConcern": {
"level": "snapshot"
"level": "majority"
},
"txnNumber": {
"$numberLong": "1"
Expand Down Expand Up @@ -741,7 +741,7 @@
"arguments": {
"options": {
"readConcern": {
"level": "snapshot"
"level": "majority"
}
}
}
Expand Down Expand Up @@ -780,7 +780,7 @@
"find": "test",
"lsid": "session0",
"readConcern": {
"level": "snapshot"
"level": "majority"
},
"txnNumber": {
"$numberLong": "1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ tests:
arguments:
options:
readConcern:
level: snapshot
level: majority
- &countDocuments
name: countDocuments
object: collection
Expand All @@ -51,7 +51,7 @@ tests:
cursor: {}
lsid: session0
readConcern:
level: snapshot
level: majority
txnNumber:
$numberLong: "1"
startTransaction: true
Expand Down Expand Up @@ -116,7 +116,7 @@ tests:
batchSize: 3
lsid: session0
readConcern:
level: snapshot
level: majority
txnNumber:
$numberLong: "1"
startTransaction: true
Expand Down Expand Up @@ -202,7 +202,7 @@ tests:
batchSize: 3
lsid: session0
readConcern:
level: snapshot
level: majority
txnNumber:
$numberLong: "1"
startTransaction: true
Expand Down Expand Up @@ -282,7 +282,7 @@ tests:
key: _id
lsid: session0
readConcern:
level: snapshot
level: majority
txnNumber:
$numberLong: "1"
startTransaction: true
Expand Down Expand Up @@ -328,7 +328,7 @@ tests:
find: *collection_name
lsid: session0
readConcern:
level: snapshot
level: majority
txnNumber:
$numberLong: "1"
startTransaction: true
Expand Down

0 comments on commit 6e438c0

Please sign in to comment.