Skip to content

Commit

Permalink
Don't drop any system collections
Browse files Browse the repository at this point in the history
  • Loading branch information
alcaeus committed Mar 27, 2020
1 parent be2f3ca commit 0eda0ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/Doctrine/ODM/MongoDB/Tests/BaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use function getenv;
use function in_array;
use function iterator_to_array;
use function preg_match;
use function version_compare;

abstract class BaseTest extends TestCase
Expand Down Expand Up @@ -56,7 +57,7 @@ public function tearDown() : void

foreach ($collections as $collection) {
// See https://jira.mongodb.org/browse/SERVER-16541
if ($collection->getName() === 'system.indexes') {
if (preg_match('#^system\.#', $collection->getName())) {
continue;
}

Expand Down

0 comments on commit 0eda0ca

Please sign in to comment.