Commit ad506578 authored by Jeremy Mikola's avatar Jeremy Mikola

Skip change stream tests if connected to a standalone

Change streams require a replica set.
parent 689d9437
...@@ -4,6 +4,7 @@ namespace MongoDB\Tests; ...@@ -4,6 +4,7 @@ namespace MongoDB\Tests;
use MongoDB\Database; use MongoDB\Database;
use MongoDB\Driver\Cursor; use MongoDB\Driver\Cursor;
use MongoDB\Driver\Server;
use MongoDB\Operation\DropCollection; use MongoDB\Operation\DropCollection;
use MongoDB\Operation\DropDatabase; use MongoDB\Operation\DropDatabase;
...@@ -923,6 +924,10 @@ class DocumentationExamplesTest extends FunctionalTestCase ...@@ -923,6 +924,10 @@ class DocumentationExamplesTest extends FunctionalTestCase
public function testChangeStreamExample_1_4() public function testChangeStreamExample_1_4()
{ {
if ($this->getPrimaryServer()->getType() === Server::TYPE_STANDALONE) {
$this->markTestSkipped('$changeStream is not supported on standalone servers');
}
if (version_compare($this->getFeatureCompatibilityVersion(), '3.6', '<')) { if (version_compare($this->getFeatureCompatibilityVersion(), '3.6', '<')) {
$this->markTestSkipped('$changeStream is only supported on FCV 3.6 or higher'); $this->markTestSkipped('$changeStream is only supported on FCV 3.6 or higher');
} }
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace MongoDB\Tests\Operation; namespace MongoDB\Tests\Operation;
use MongoDB\Client; use MongoDB\Client;
use MongoDB\Driver\Server;
use MongoDB\Operation\DatabaseCommand; use MongoDB\Operation\DatabaseCommand;
use MongoDB\Operation\InsertOne; use MongoDB\Operation\InsertOne;
use MongoDB\Operation\Watch; use MongoDB\Operation\Watch;
...@@ -13,6 +14,10 @@ class WatchFunctionalTest extends FunctionalTestCase ...@@ -13,6 +14,10 @@ class WatchFunctionalTest extends FunctionalTestCase
{ {
parent::setUp(); parent::setUp();
if ($this->getPrimaryServer()->getType() === Server::TYPE_STANDALONE) {
$this->markTestSkipped('$changeStream is not supported on standalone servers');
}
if (version_compare($this->getFeatureCompatibilityVersion(), '3.6', '<')) { if (version_compare($this->getFeatureCompatibilityVersion(), '3.6', '<')) {
$this->markTestSkipped('$changeStream is only supported on FCV 3.6 or higher'); $this->markTestSkipped('$changeStream is only supported on FCV 3.6 or higher');
} }
......
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