NetworkInterfaceMock hangs at shutdown if currentlyRunning = network

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: 3.1.1
    • Component/s: Replication
    • None
    • Replication
    • ALL
    • Hide

      Throw an exception after calling enterNetwork() in a test fixture run in the unittest framework.

      Show
      Throw an exception after calling enterNetwork() in a test fixture run in the unittest framework.
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      If a unittest ASSERT fails after a call to enterNetwork() but before a call to exitNetwork(), the process may hang. This is because the ReplicationExecutor shutdown logic does not handle the case where all the work and event items are drained with "Cancelled" status, but the state of the NetworkInterfaceMock is still waiting for a simulated network thread to finish running.
      This can be fixed by ensuring exitNetwork() is called via any exit path (using ScopeGuard, for example), but it might be more convenient to make improvements to NetworkInterfaceMock to avoid such hangs.

            Assignee:
            [DO NOT USE] Backlog - Replication Team
            Reporter:
            Eric Milkie
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: