Use with_error client and pool constructors in test suite

XMLWordPrintableJSON

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

      CDRIVER-3723 will introduce new mongoc_client_new_from_uri_with_error and mongoc_client_pool_new_with_error methods. Ideally, the test suite should use these methods when creating clients and pools with test_framework_client_new_from_uri and test_framework_client_pool_new_from_uri, respectively.

      Since those internal functions can currently return NULL (for tests that expect client/pool construction to fail), the functions may need to be augmented to take an optional bson_error_t. That would allow callers to use ASSERT_OR_PRINT, which in turn will allow for more intuitive error messages when client/pool construction fails (vs. possible segfaults).

              Assignee:
              Unassigned
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: