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

Use with_error client and pool constructors in test suite

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

      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 Unassigned
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: