-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DRIVERS-943 Convert retryable writes command construction tests to un…
…ified format (#1697) Co-authored-by: Kevin Albertson <kevin.albertson@10gen.com>
- Loading branch information
1 parent
ffe8b9e
commit 11022ca
Showing
29 changed files
with
1,003 additions
and
50 deletions.
There are no files selected for viewing
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
144 changes: 144 additions & 0 deletions
144
source/retryable-writes/tests/unified/aggregate-out-merge.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
65 changes: 65 additions & 0 deletions
65
source/retryable-writes/tests/unified/aggregate-out-merge.yml
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,65 @@ | ||
description: "aggregate with $out/$merge does not set txnNumber" | ||
|
||
schemaVersion: "1.3" | ||
|
||
runOnRequirements: | ||
- minServerVersion: "3.6" | ||
topologies: | ||
- replicaset | ||
- sharded | ||
- load-balanced | ||
|
||
createEntities: | ||
- client: | ||
id: &client0 client0 | ||
observeEvents: [ commandStartedEvent ] | ||
- database: | ||
id: &database0 database0 | ||
client: *client0 | ||
databaseName: &database0Name retryable-writes-tests | ||
- collection: | ||
id: &collection0 collection0 | ||
database: *database0 | ||
collectionName: &collection0Name coll0 | ||
|
||
initialData: | ||
# The output collection must already exist for $merge on a sharded cluster | ||
- collectionName: &mergeCollection mergeCollection | ||
databaseName: *database0Name | ||
documents: [] | ||
|
||
tests: | ||
- description: "aggregate with $out does not set txnNumber" | ||
operations: | ||
- object: *collection0 | ||
name: aggregate | ||
arguments: | ||
pipeline: | ||
- { $sort: { x: 1 } } | ||
- { $match: { _id: { $gt: 1 } } } | ||
- { $out: outCollection } | ||
expectEvents: | ||
- client: client0 | ||
events: | ||
- commandStartedEvent: | ||
commandName: aggregate | ||
command: | ||
txnNumber: { $$exists: false } | ||
- description: "aggregate with $merge does not set txnNumber" | ||
runOnRequirements: | ||
- minServerVersion: "4.1.11" | ||
operations: | ||
- object: *collection0 | ||
name: aggregate | ||
arguments: | ||
pipeline: | ||
- { $sort: { x: 1 } } | ||
- { $match: { _id: { $gt: 1 } } } | ||
- { $merge: { into: *mergeCollection } } | ||
expectEvents: | ||
- client: client0 | ||
events: | ||
- commandStartedEvent: | ||
commandName: aggregate | ||
command: | ||
txnNumber: { $$exists: false } |
Oops, something went wrong.