-
Type: Task
-
Resolution: Unresolved
-
Priority: 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.
- is related to
-
NODE-2598 Change stream close refactor
- Closed