Skip to content

Commit 22d70c7

Browse files
committed
Don't drop any system collections
1 parent 2b016c3 commit 22d70c7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/Doctrine/ODM/MongoDB/Tests/BaseTest.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use function getenv;
2020
use function in_array;
2121
use function iterator_to_array;
22+
use function preg_match;
2223
use function version_compare;
2324

2425
abstract class BaseTest extends TestCase
@@ -56,7 +57,7 @@ public function tearDown() : void
5657

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

0 commit comments

Comments
 (0)