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

MockStream should handle cancellation while it is paused

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.2.13, 3.4.4, 3.5.5
    • Affects Version/s: None
    • Component/s: Networking
    • None
    • Fully Compatible
    • ALL
    • v3.4, v3.2
    • Platforms 2017-03-27
    • 0

      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.

            Assignee:
            samantha.ritter@mongodb.com Samantha Ritter (Inactive)
            Reporter:
            samantha.ritter@mongodb.com Samantha Ritter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: