-
Notifications
You must be signed in to change notification settings - Fork 245
Add missing tests for bulkWrite command #1803
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
Changes from 2 commits
5427834
bb5ab0c
a0073bb
9d14cb0
3ef3952
738d07e
c50cc40
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -349,3 +349,64 @@ tests: | |
document: { _id: 3, x: 33 } | ||
nsInfo: | ||
- ns: *namespace | ||
- description: "client bulkWrite with unacknowledged write concern (w:0) for all batches" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Include in the description that this test is expected to return an error. |
||
runOnRequirements: | ||
- minServerVersion: "8.0" | ||
serverless: forbid | ||
operations: | ||
- object: *client0 | ||
name: clientBulkWrite | ||
arguments: | ||
models: | ||
- insertOne: | ||
namespace: *namespace | ||
document: { _id: 5, x: 55 } | ||
- insertOne: | ||
namespace: *namespace | ||
document: { _id: 6, x: 66 } | ||
verboseResults: false | ||
ordered: false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be |
||
writeConcern: { w: 0 } | ||
expectError: | ||
isClientError: true | ||
errorContains: "Cannot request unacknowledged write concern and ordered writes" | ||
expectEvents: | ||
- client: *client0 | ||
events: [] | ||
- description: "client bulkWrite with unacknowledged write concern (w:0) for all batches with ordered=false" | ||
runOnRequirements: | ||
- minServerVersion: "8.0" | ||
serverless: forbid | ||
operations: | ||
- object: *client0 | ||
name: clientBulkWrite | ||
arguments: | ||
models: | ||
- insertOne: | ||
namespace: *namespace | ||
document: { _id: 5, x: 55 } | ||
- insertOne: | ||
namespace: *namespace | ||
document: { _id: 6, x: 66 } | ||
verboseResults: false | ||
ordered: false | ||
writeConcern: { w: 0 } | ||
expectResult: { $$unsetOrMatches: { acknowledged: { $$unsetOrMatches: false } } } | ||
expectEvents: | ||
- client: *client0 | ||
events: | ||
- commandStartedEvent: | ||
commandName: bulkWrite | ||
databaseName: admin | ||
command: | ||
bulkWrite: 1 | ||
errorsOnly: false | ||
ordered: false | ||
ops: | ||
- insert: 0 | ||
document: { _id: 5, x: 55 } | ||
- insert: 0 | ||
document: { _id: 6, x: 66 } | ||
nsInfo: | ||
- ns: *namespace | ||
writeConcern: { w: 0 } |
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.
bulk write should be bulkWrite for consistency with other tests.