Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-2529

Add tests for endSessions cleanup behavior

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Component/s: Sessions
    • None
    • Not Needed

      Summary

      The sessions specification requires that drivers execute an endSessions command on client close, but there aren't any tests for this behavior. The Rust driver accidentally omitted this feature and it went unnoticed for a while as a result (RUST-1437).

      Now that Client.close is supported in the Unified Test Format, automated tests could be used for this purpose.

      Motivation

      Who is the affected end user?

      Driver authors, users if the feature isn't implemented properly.

      How does this affect the end user?

      The endSessions command might not be run, or it might be run in unstandardized ways across drivers.

      How likely is it that this problem or use case will occur?

      This codepath is executed every time a client shuts down, so it's on the main path.

      If the problem does occur, what are the consequences and how severe are they?

      Long running operations may not be cancelled in some drivers when the client is closed, or the behavior for cancelling them may vary from driver to driver.

      Is this issue urgent?

      No

      Is this ticket required by a downstream team?

      Shell maybe? (see NODE-3263)

      Is this ticket only for tests?

      Yes

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

              Created:
              Updated: