Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-2599

Create improved change stream mid-close test

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Change Streams, Testing
    • 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 Unassigned
            Reporter:
            eric.adum@mongodb.com Eric Adum (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: