Skip to content

Commit b42924e

Browse files
committed
Merge pull request #628
2 parents b19328a + 45a59ae commit b42924e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/Operation/WatchFunctionalTest.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff 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();

0 commit comments

Comments
 (0)