Commit b42924e6 authored by Jeremy Mikola's avatar Jeremy Mikola

Merge pull request #628

parents b19328ac 45a59ae9
...@@ -398,11 +398,11 @@ class WatchFunctionalTest extends FunctionalTestCase ...@@ -398,11 +398,11 @@ class WatchFunctionalTest extends FunctionalTestCase
$this->insertDocument(['_id' => 1]); $this->insertDocument(['_id' => 1]);
/* Killing the cursor a second time when there is a result will test /* Killing the cursor and advancing when there is a result will test
* that the resume attempt picks up the latest change. */ * that next()'s resume attempt picks up the latest change. */
$this->killChangeStreamCursor($changeStream); $this->killChangeStreamCursor($changeStream);
$changeStream->rewind(); $changeStream->next();
$this->assertTrue($changeStream->valid()); $this->assertTrue($changeStream->valid());
$this->assertSame(0, $changeStream->key()); $this->assertSame(0, $changeStream->key());
...@@ -418,7 +418,8 @@ class WatchFunctionalTest extends FunctionalTestCase ...@@ -418,7 +418,8 @@ class WatchFunctionalTest extends FunctionalTestCase
/* Killing the cursor a second time will not trigger a resume until /* Killing the cursor a second time will not trigger a resume until
* ChangeStream::next() is called. A successive call to rewind() should * 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); $this->killChangeStreamCursor($changeStream);
$changeStream->rewind(); $changeStream->rewind();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment