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()
398398
399399 $ this ->insertDocument (['_id ' => 1 ]);
400400
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. */
403403 $ this ->killChangeStreamCursor ($ changeStream );
404404
405- $ changeStream ->rewind ();
405+ $ changeStream ->next ();
406406 $ this ->assertTrue ($ changeStream ->valid ());
407407 $ this ->assertSame (0 , $ changeStream ->key ());
408408
@@ -418,7 +418,8 @@ public function testResumeMultipleTimesInSuccession()
418418
419419 /* Killing the cursor a second time will not trigger a resume until
420420 * 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. */
422423 $ this ->killChangeStreamCursor ($ changeStream );
423424
424425 $ changeStream ->rewind ();
You can’t perform that action at this time.
0 commit comments