Skip to content

Commit 32bade4

Browse files
committed
PHPLIB-461: Fix ChangeStream tests on sharded clusters
1 parent a42e347 commit 32bade4

File tree

3 files changed

+127
-66
lines changed

3 files changed

+127
-66
lines changed

tests/DocumentationExamplesTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,10 @@ public function testChangeStreamExample_1_4()
935935
{
936936
$this->skipIfChangeStreamIsNotSupported();
937937

938+
if ($this->isShardedCluster()) {
939+
$this->markTestSkipped('Test does not apply on sharded clusters: need more than a single getMore call on the change stream.');
940+
}
941+
938942
$db = new Database($this->manager, $this->getDatabaseName());
939943
$db->dropCollection('inventory');
940944
$db->createCollection('inventory');

tests/FunctionalTestCase.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,6 @@ protected function skipIfChangeStreamIsNotSupported()
336336
if (! $this->isShardedClusterUsingReplicasets()) {
337337
$this->markTestSkipped('$changeStream is only supported with replicasets');
338338
}
339-
340-
// Temporarily skip tests because of an issue with change streams in the driver
341-
$this->markTestSkipped('$changeStreams currently don\'t on replica sets');
342339
break;
343340

344341
case Server::TYPE_RS_PRIMARY:

0 commit comments

Comments
 (0)