Skip to content

PHPLIB-441: Fix testResumeMultipleTimesInSuccession #628

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions tests/Operation/WatchFunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -398,11 +398,11 @@ public function testResumeMultipleTimesInSuccession()

$this->insertDocument(['_id' => 1]);

/* Killing the cursor a second time when there is a result will test
* that the resume attempt picks up the latest change. */
/* Killing the cursor and advancing when there is a result will test
* that next()'s resume attempt picks up the latest change. */
$this->killChangeStreamCursor($changeStream);

$changeStream->rewind();
$changeStream->next();
$this->assertTrue($changeStream->valid());
$this->assertSame(0, $changeStream->key());

Expand All @@ -418,7 +418,8 @@ public function testResumeMultipleTimesInSuccession()

/* Killing the cursor a second time will not trigger a resume until
* ChangeStream::next() is called. A successive call to rewind() should
* not change the iterator's state and preserve the current result. */
* not change the iterator's state and preserve the current result.
* Note: PHPLIB-448 may require this rewind() to throw an exception. */
$this->killChangeStreamCursor($changeStream);

$changeStream->rewind();
Expand Down