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

MockStream should handle cancellation while it is paused

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.13, 3.4.4, 3.5.5
    • Component/s: Networking
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v3.4, v3.2
    • Sprint:
      Platforms 2017-03-27
    • Linked BF Score:
      0

      Description

      The MockStream class used in network_interface_asio_test works by pausing itself as certain key Events occur (like reading, writing, connecting) to allow the test thread to investigate the state of the connection. The MockStream contains a set of states that show where it has paused itself (kBlockedBeforeConnect, kBlockedBeforeRead, kBlockedAfterWrite, kCanceled). We have made an assumption that the state of the stream will not change while it is paused. However, it is perfectly valid for the NIA to call cancel() on the MockStream while we have it paused. Currently, if this happens, we may invariant.

      The methods that operate on MockStream while it is paused (pushRead(), popWrite()) should account for possible cancellation by the NIA.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: