Add additional tests for mongoc_database_aggregate

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: libmongoc, Testing
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: