Uploaded image for project: 'Rust Driver'
  1. Rust Driver
  2. RUST-1449

Simplify test client creation

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.2.0
    • Affects Version/s: None
    • Component/s: None
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      The tests currently have a few different ways of creating test clients:

      • TestClient::new
      • TestClient::with_options
      • TestClient::with_handler
      • TestClient::with_additional_options
      • EventClient::new
      • EventClient::with_options_and_handler
      • EventClient::with_options
      • EventClient::with_additional_options

      Within these various methods, there are also a number of different ways of populating the options from MONGODB_URI and additional options provided by the runner:

      • TestClient::options_for_multiple_mongoses
      • update_options_for_testing
      • ClientOptions::merge
      • merge_uri_options

      All of these different methods add a lot of complexity to configuring clients, and making small changes to runners or any of these methods can lead to tricky failures that are difficult to diagnose. Furthermore, different test runners make use of different combinations of these configurations, which can lead to inconsistencies between them.

      We should try to consolidate all of these down to a much simpler set of methods that are easier to maintain and use.

            Assignee:
            abraham.egnor@mongodb.com Abraham Egnor
            Reporter:
            patrick.freed@mongodb.com Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: