[GODRIVER-526] Fix command monitoring assertions in tests Created: 16/Aug/18  Updated: 28/Oct/23  Resolved: 25/Aug/20

Status: Closed
Project: Go Driver
Component/s: CRUD
Affects Version/s: None
Fix Version/s: 1.5.0

Type: Improvement Priority: Major - P3
Reporter: Roland Fong Assignee: Divjot Arora (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The command monitoring event checking code in our spec test runners skips over the "ordered", "cursor", and "batchSize" keys (https://github.com/mongodb/mongo-go-driver/blob/1c6ce243313adea74223d6f14539f18d938b5aa1/mongo/integration/cmd_monitoring_helpers_test.go#L265). We should go through these keys and see if we can change the code for the relevant CRUD functions that would not cause behavioral changes but would allow us to un-skip these keys.

EDIT: There were some code changes required to unskip these keys:

  1. The InsertOne/InsertMany, UpdateOne/UpdateMany, ReplaceOne, and DeleteOne/DeleteMany helpers now send an explicit ordered:true field in their command. This should have no behavioral changes.
  2. A BatchSize option was added for the ListCollections helper.


 Comments   
Comment by Githook User [ 25/Aug/20 ]

Author:

{'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com', 'username': 'divjotarora'}

Message: GODRIVER-526 Unskip keys in command monitoring assertions (#482)
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/e51b43f1844c0673aaafe4e2f6748e154300b071

Comment by Divjot Arora (Inactive) [ 14/Aug/20 ]

https://github.com/mongodb/mongo-go-driver/pull/482

Generated at Thu Feb 08 08:34:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.