Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-3029

Add additional tests for mongoc_database_aggregate

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: libmongoc, Testing
    • None

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: