-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DRIVERS-943 Convert retryable writes command construction tests to unified format #1697
Merged
isabelatkinson
merged 14 commits into
mongodb:master
from
isabelatkinson:convert-retryability-tests
Nov 13, 2024
Merged
Changes from 13 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
0aca027
txnNumber unset
isabelatkinson 82a124b
txnNumber set
isabelatkinson 148e514
changelog
isabelatkinson 4d8b856
fix topologies
isabelatkinson 5e9fedc
remove relative link
isabelatkinson 48e417f
json
isabelatkinson 00230d9
runOnRequirement for
isabelatkinson 6a9fa2d
fix on sharded
isabelatkinson b11579e
fix schema version for load-balanced
isabelatkinson 3e5ff65
use initialData rather than create
isabelatkinson 8f7c097
Kevin's test fixes
isabelatkinson 4f80f5f
json
isabelatkinson 3bfa54b
split bulkWrite tests
isabelatkinson 9ee4c5a
strikethrough
isabelatkinson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel this wording is a little confusing - originally it made me think we are no longer asserting on
txnNumber
.I think it'd be better to remove this section, and if we want to include this information somewhere, we can expand in the changelog instead. Something like the following:
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The specs README states:
I think it's useful to maintain this section as a reference for drivers that have not yet removed these tests. WDYT about adding a strikethrough to the section title and rephrasing this as:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, we can also rephrase it to something like.
This or the strikethrough works!