[CDRIVER-3029] Add additional tests for mongoc_database_aggregate Created: 19/Mar/19  Updated: 31/Mar/22

Status: Backlog
Project: C Driver
Component/s: libmongoc, tests
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Gantt Dependency
has to be done after CDRIVER-2899 Add a database aggregate helper Closed
Epic Link: CDRIVER-2733

 Description   

CDRIVER-2899 incorporates CRUD tests and a mock server test for read/write concern inheritance, but we'd do well to add additional tests for mongoc_database_aggregate(). These can be ported over from existing collection tests (and adapted to use OP_MSG) where it makes sense. Some ideas:

  • batchSize and/or bypassDocumentValidation options
  • read preference inheritance, and overriding to primary on $out
  • behavior for invalid read preferences
  • serverId selection

Since both helpers use common code in mongoc-aggregate.c, read preference inheritance is probably the most useful test case. It may also make more sense to repurpose this ticket to extract many of the current collection tests to a new test-mongoc-aggregate.c file. Then the database and collection test files can only concern themselves with inheritance.



 Comments   
Comment by Kevin Albertson [ 20/Mar/19 ]

Also test-mongoc-opts.c already has the logic in place to easily test read preference inheritance. We should update that file to include mongoc_database_aggregate.

Generated at Wed Feb 07 21:16:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.