Skip to content

Commit 7f889f4

Browse files
authored
PHPLIB-616 Continuous Matrix Testing for 4.2 era drivers (#812)
* Skip failing tests for 4.2 driver * Don't attempt to drop admin database in spec tests
1 parent 072d5e8 commit 7f889f4

6 files changed

+17
-1
lines changed

tests/Collection/CollectionFunctionalTest.php

+2
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,9 @@ public function testWithOptionsPassesOptions()
381381

382382
/**
383383
* @group matrix-testing-server-4.4-driver-4.0
384+
* @group matrix-testing-server-4.4-driver-4.2
384385
* @group matrix-testing-server-5.0-driver-4.0
386+
* @group matrix-testing-server-5.0-driver-4.2
385387
*/
386388
public function testMapReduce()
387389
{

tests/Model/IndexInfoFunctionalTest.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ public function testIs2dSphere()
4747
$this->assertEquals($expectedVersion, $index['2dsphereIndexVersion']);
4848
}
4949

50-
/** @group matrix-testing-server-5.0-driver-4.0 */
50+
/**
51+
* @group matrix-testing-server-5.0-driver-4.0
52+
* @group matrix-testing-server-5.0-driver-4.2
53+
*/
5154
public function testIsGeoHaystack()
5255
{
5356
$indexName = $this->collection->createIndex(['pos' => 'geoHaystack', 'x' => 1], ['bucketSize' => 5]);

tests/Operation/ListCollectionsFunctionalTest.php

+2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ public function testListCollectionsForNewlyCreatedDatabase()
3838

3939
/**
4040
* @group matrix-testing-server-4.4-driver-4.0
41+
* @group matrix-testing-server-4.4-driver-4.2
4142
* @group matrix-testing-server-5.0-driver-4.0
43+
* @group matrix-testing-server-5.0-driver-4.2
4244
*/
4345
public function testIdIndexAndInfo()
4446
{

tests/Operation/MapReduceFunctionalTest.php

+2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414

1515
/**
1616
* @group matrix-testing-server-4.4-driver-4.0
17+
* @group matrix-testing-server-4.4-driver-4.2
1718
* @group matrix-testing-server-5.0-driver-4.0
19+
* @group matrix-testing-server-5.0-driver-4.2
1820
*/
1921
class MapReduceFunctionalTest extends FunctionalTestCase
2022
{

tests/SpecTests/FunctionalTestCase.php

+4
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ protected function dropTestAndOutcomeCollections()
186186
{
187187
$context = $this->getContext();
188188

189+
if ($context->databaseName === 'admin') {
190+
return;
191+
}
192+
189193
if ($context->bucketName !== null) {
190194
$bucket = $context->getGridFSBucket($context->defaultWriteOptions);
191195
$bucket->drop();

tests/SpecTests/RetryableReadsSpecTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ public static function assertCommandMatches(stdClass $expected, stdClass $actual
4242
* Execute an individual test case from the specification.
4343
*
4444
* @dataProvider provideTests
45+
* @group matrix-testing-server-4.4-driver-4.2
46+
* @group matrix-testing-server-5.0-driver-4.2
47+
*
4548
* @param stdClass $test Individual "tests[]" document
4649
* @param array $runOn Top-level "runOn" array with server requirements
4750
* @param array|object $data Top-level "data" array to initialize collection

0 commit comments

Comments
 (0)