CDRIVER-3723 finalize URI during client/pool construction (#921)
Introduces new mongoc_client_new_from_uri_with_error and mongoc_client_pool_new_with_error methods. Also addresses topology leak in mongoc_client_new_from_uri (CDRIVER-4251). * Remove redundant warnings about unused results * Explain why we need not handle null result from _mongoc_client_new_from_topology * Log URI errors in mongoc_client_new as warnings * Clear logs between /Client/max_staleness assertions * Set error instead of logging in mongoc_client_pool_new_with_error * Remove test expecting a client with an invalid topology * Revise assertions in /loadbalanced/client_uri_validation test This no longer requires constructing a client and expecting an error through server selection. * Use tracing macro for return statement * Check MONGOC_ENABLE_SSL in mongoc_client_new_from_uri_with_error Moving the check up from _mongoc_client_new_from_topology makes mongoc_client_new_from_uri_with_error consistent with mongoc_client_pool_new_with_error. Additionally, we add log message assertions to corresponding tests. * Anticipate null pool or client in SRV error tests * Remove obsolete tests for invalid LB topologies These tests were previously introduced in CDRIVER-4184 but no longer apply now that we prohibit construction of clients and pools with an invalid topology. * _mongoc_client_new_from_topology should require a valid topology * Document precondition for _mongoc_client_new_from_topology Co-authored-by:Ezra Chung <88335979+eramongodb@users.noreply.github.com> Co-authored-by:
Kevin Albertson <kevin.albertson@mongodb.com>
parent
6d08ea53
Please register or sign in to comment