Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-6152

Add testing to ensure that MongoClient.connect will hold the event loop open until it resolves

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: CSOT
    • 2
    • 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?

      Use Case

      As a driver engineer,
      I want testing to ensure that server selection / connection checkout hold the event loop open until the client has connected,
      So that the process does not exit if there's no additional work happening when client.connect() is called.

      User Impact

      • n/a - testing only

      Dependencies

      • n/a

      Unknowns

      • n/a

      Acceptance Criteria

      Implementation Requirements

      • add a test that confirms that the process does not exit when attempting to connect to a non-existent server and that server selection rejects instead.
        • We can use `process.on('beforeExit')` to determine that a process is about to exit

      Testing Requirements

      • n/a

      Documentation Requirements

      • n/a

      Follow Up Requirements

      • n/a

            Assignee:
            Unassigned Unassigned
            Reporter:
            warren.james@mongodb.com Warren James
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: