Skip to content

Commit aa26460

Browse files
committed
Skip failing tests on MongoDB 4.9
1 parent 08559b0 commit aa26460

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

tests/FunctionalTestCase.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,13 @@ protected function skipIfClientSideEncryptionIsNotSupported()
393393
}
394394
}
395395

396+
protected function skipIfGeoHaystackIndexIsNotSupported()
397+
{
398+
if (version_compare($this->getServerVersion(), '4.9', '>=')) {
399+
$this->markTestSkipped('GeoHaystack indexes cannot be created in version 4.9 and above');
400+
}
401+
}
402+
396403
protected function skipIfTransactionsAreNotSupported()
397404
{
398405
if ($this->getPrimaryServer()->getType() === Server::TYPE_STANDALONE) {

tests/Model/IndexInfoFunctionalTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ public function testIs2dSphere()
5151

5252
public function testIsGeoHaystack()
5353
{
54+
$this->skipIfGeoHaystackIndexIsNotSupported();
55+
5456
$indexName = $this->collection->createIndex(['pos' => 'geoHaystack', 'x' => 1], ['bucketSize' => 5]);
5557
$result = $this->collection->listIndexes();
5658

0 commit comments

Comments
 (0)