Skip to content

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

devin-ai-integration[bot]
Copy link

Added missing tests for bulkWrite command

This PR adds tests for:

  1. Relaxed numeric type requirements for indexes in update operations
  2. Relaxed numeric type requirements for indexes in delete operations
  3. Unacknowledged write concern with w:0 for all batches

These tests cover recent changes to the bulk-write specification, specifically:

  • Support for non-Int32 numeric types in index hints (added on 2024-09-18)
  • Error handling for unacknowledged write concerns with ordered=true (added on 2024-10-07)
  • Proper handling of unacknowledged write concerns with ordered=false

Changes

  • Added test for non-Int32 hint to client-bulkWrite-update-options.yml
  • Added test for non-Int32 hint to client-bulkWrite-delete-options.yml
  • Added tests for unacknowledged write concern to client-bulkWrite-options.yml

Link to Devin run: https://app.devin.ai/sessions/9b320f37d14b47999b5f313aa3df8fe4
Requested by: [email protected]

@devin-ai-integration devin-ai-integration bot requested a review from a team as a code owner May 14, 2025 22:30
@devin-ai-integration devin-ai-integration bot requested review from nbbeeken and removed request for a team May 14, 2025 22:30
Copy link
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@JamesKovacs JamesKovacs requested review from JamesKovacs and removed request for nbbeeken May 14, 2025 22:36
Copy link
Contributor

@JamesKovacs JamesKovacs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor changes requested.

namespace: *namespace
document: { _id: 6, x: 66 }
verboseResults: false
ordered: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be ordered: true.

@@ -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"
Copy link
Contributor

Choose a reason for hiding this comment

The 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.

@@ -135,3 +135,56 @@ tests:
- databaseName: *database0Name
collectionName: *collection0Name
documents: []
- description: "client bulk write delete with non-Int32 hint"
Copy link
Contributor

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.

@@ -349,7 +349,7 @@ tests:
document: { _id: 3, x: 33 }
nsInfo:
- ns: *namespace
- description: "client bulkWrite with unacknowledged write concern (w:0) for all batches"
- description: "client bulkWrite with unacknowledged write concern (w:0) for all batches - expected to return an error"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indicate that this test involves w:0 with ordered:true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant