[CDRIVER-2456] test_bulk_write should have different behaviors depending on server version Created: 08/Jan/18 Updated: 28/Oct/23 Resolved: 29/Jan/18 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.10.0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Pavithra Vetriselvan | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Description |
|
In test-mongoc-command-monitoring.c, test_bulk_write runs a bulk operation and then checks to see if the events BSON matches the expected events object in bulkWrite.yml and bulkWrite.json. In the expected output, we expect a { "reply": "ok" }for both acknowledged and unacknowledged writes. This is only correct when interacting with server versions below 3.6. Starting in 3.6, we use OP_MSG to handle wc: 0 and should no longer expect a server reply. We should add a flag in bulkWrite.yml and bulkWrite.json that indicates whether or not we should be using OP_MSG so that we can skip tests accordingly. |
| Comments |
| Comment by Githook User [ 29/Jan/18 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: |
| Comment by Gregory McKeon (Inactive) [ 29/Jan/18 ] |
|
jesse assigning to you to clear Pavi's queue. |
| Comment by A. Jesse Jiryu Davis [ 18/Jan/18 ] |
|
Nevermind about the SPEC ticket, just update the C Driver test to consider an unacknowledged command that succeeds with outcome {} is equivalent to {ok: 1} for the sake of passing the spec tests. |
| Comment by A. Jesse Jiryu Davis [ 08/Jan/18 ] |
|
Right. Open a SPEC ticket and propose a fix to the original test in the mongodb/specifications repo for all drivers. Then we’ll copy the fix to the C Driver. |