File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -398,11 +398,11 @@ public function testResumeMultipleTimesInSuccession()
398
398
399
399
$ this ->insertDocument (['_id ' => 1 ]);
400
400
401
- /* Killing the cursor a second time when there is a result will test
402
- * that the resume attempt picks up the latest change. */
401
+ /* Killing the cursor and advancing when there is a result will test
402
+ * that next()'s resume attempt picks up the latest change. */
403
403
$ this ->killChangeStreamCursor ($ changeStream );
404
404
405
- $ changeStream ->rewind ();
405
+ $ changeStream ->next ();
406
406
$ this ->assertTrue ($ changeStream ->valid ());
407
407
$ this ->assertSame (0 , $ changeStream ->key ());
408
408
@@ -418,7 +418,8 @@ public function testResumeMultipleTimesInSuccession()
418
418
419
419
/* Killing the cursor a second time will not trigger a resume until
420
420
* ChangeStream::next() is called. A successive call to rewind() should
421
- * not change the iterator's state and preserve the current result. */
421
+ * not change the iterator's state and preserve the current result.
422
+ * Note: PHPLIB-448 may require this rewind() to throw an exception. */
422
423
$ this ->killChangeStreamCursor ($ changeStream );
423
424
424
425
$ changeStream ->rewind ();
You can’t perform that action at this time.
0 commit comments