Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-6804 Add a test to prevent unhandled rejections from passing tests
  3. NODE-6844

Fix defer hooks being passed a promise instead of a function that returns a promise

    • Type: Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.15.0
    • Affects Version/s: None
    • Component/s: None
    • 0
    • Not Needed
    • 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?

      Use Case

      In the change streams tests there are two defer hooks that are given a promise rather than a function. There are unhandled rejections that flakily appear from these + the defer call has no effect.

      User Experience

      • What is the desired/expected outcome for the user once this ticket is implemented?
      • If bug: What is the number of impacted customers? How severe is the impact? Is anyone blocked or broken?

      Dependencies

      • The unhandled rejection PR will be greener with this change

      Risks/Unknowns

      • None

      Acceptance Criteria

      Implementation Requirements

      • fix the incorrect defer usages
      • migrate defer to async/await to get correct stack traces if errors arise again

      Testing Requirements

      • Tests all pass

      Documentation Requirements

      • None

      Follow Up Requirements

      • None

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Bailey Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: