Commit a49d6e52 authored by Jeremy Mikola's avatar Jeremy Mikola

Rename next() resume test and remove rewind() resume tests

Resume tests for rewind() will be reimplemented in PHPLIB-322
parent 1f0d7bc5
......@@ -29,7 +29,7 @@ class WatchFunctionalTest extends FunctionalTestCase
}
}
public function testResume()
public function testNextResumesAfterCursorNotFound()
{
$this->insertDocument(['_id' => 1, 'x' => 'foo']);
......@@ -175,32 +175,6 @@ class WatchFunctionalTest extends FunctionalTestCase
$this->assertSameDocument($expectedResult, $changeStream->current());
}
public function testResumeAfterKillThenNoOperations()
{
$operation = new Watch($this->manager, $this->getDatabaseName(), $this->getCollectionName(), [], ['maxAwaitTimeMS' => 100]);
$changeStream = $operation->execute($this->getPrimaryServer());
$this->killChangeStreamCursor($changeStream);
$changeStream->next();
$this->assertFalse($changeStream->valid());
$this->assertNull($changeStream->current());
}
public function testResumeAfterKillThenOperation()
{
$operation = new Watch($this->manager, $this->getDatabaseName(), $this->getCollectionName(), [], ['maxAwaitTimeMS' => 100]);
$changeStream = $operation->execute($this->getPrimaryServer());
$this->killChangeStreamCursor($changeStream);
$this->insertDocument(['_id' => 1, 'x' => 'foo']);
$changeStream->next();
$this->assertFalse($changeStream->valid());
$this->assertNull($changeStream->current());
}
public function testKey()
{
$operation = new Watch($this->manager, $this->getDatabaseName(), $this->getCollectionName(), [], ['maxAwaitTimeMS' => 100]);
......
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