Create improved change stream mid-close test

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Change Streams, Testing
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Write a better test using mocking to test the behavior when a change stream is closed by the user with close after calling next, but before the call to processNewChange initiated by next has called back.

      • call next on the change stream immediately
      • call close on the change stream immediately
      • it takes 10s for next to complete, but changeStream.closed is set to true immediately
      • 10s later, the callback for next is triggered

      Test should not: return a valid result after 10s
      Test should: immediately callback indicating the stream has been closed

      Likely will need to stub Topology.prototype.selectServer and maybe Topology.prototype.command.

              Assignee:
              Unassigned
              Reporter:
              Eric Adum (Inactive)
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: