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

Unified test runner does not propagate errors to the withTransaction API

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.9.0
    • Affects Version/s: None
    • Component/s: None
    • 2
    • 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

      As a Node.js engineer
      I want a unified test runner that propagates the errors from operations inside the callback to the withTransaction API
      So that I can run assertions on the outcome of withTransaction as expected

      User Experience

      • None

      Dependencies

      • Unified test runner

      Risks/Unknowns

      • Not sure if this will break some tests, but they never would've been asserting the correct behavior anyway

      Acceptance Criteria

      Implementation Requirements

      • Adjust the executeOperationAndCheck helper to rethrow any errors it encounters if requested

      Testing Requirements

      • Write a test that used the withTransaction operation and test that you can obtain the same error an operation was made to throw inside the callback
      • Expect that there is an abortTransaction command event as a result of the error

      Documentation Requirements

      • None

      Follow Up Requirements

      • None

      Reference

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Aditi Khare
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: