Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-54353

Wait for ServiceExecutorFixed to join in ServiceStateMachineTest

    XMLWordPrintable

Details

    • Fully Compatible
    • ALL
    • v5.0
    • Service Arch 2021-06-14
    • 124
    • 3

    Description

      Some of the tests in ServiceStateMachineTest schedule tasks on ServiceExecutorFixed (e.g., ServiceStateMachineWithBorrowedThreadsTest). This is to run the tasks scheduled by ServiceStateMachine on the fixed thread-pool (see here).

      Since we don't currently wait for the fixed thread-pool to join before destroying the ServiceStateMachineTest test-fixture (see here), there's a possibility to destroy the service context before destroying all clients, thus hitting this invariant invariant(_clients.empty());.

      Acceptance criteria: retire all tasks on fixed thread-pool before calling the destructor for ServiceStateMachineTest.

      Attachments

        Issue Links

          Activity

            People

              billy.donahue@mongodb.com Billy Donahue
              amirsaman.memaripour@mongodb.com Amirsaman Memaripour
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: