Skip to content

Commit d77efd8

Browse files
committed
MAGETWO-88814: [Performance] Some indexes become recreated on db with prefixes
1 parent 5d6896b commit d77efd8

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

dev/tests/integration/testsuite/Magento/Setup/Declaration/WhitelistDeclarationTest.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
namespace Magento\Setup\Declaration;
99

10+
use Magento\Framework\App\Utility\Files;
1011
use Magento\Framework\Component\ComponentRegistrar;
1112
use Magento\Framework\Component\ComponentRegistrarInterface;
1213
use Magento\Framework\Setup\Declaration\Schema\Dto\Constraint;
@@ -86,7 +87,14 @@ public function testConstraintsAndIndexesAreWhitelisted()
8687
*/
8788
private function filterUndeclaredElements(array $undeclaredElements): array
8889
{
89-
$ignoredElements = json_decode(file_get_contents(__DIR__ . '/_files/ignore_whitelisting.json'), true);
90+
$files = Files::getFiles([__DIR__ . '/_files/ignore_whitelisting'], '*.json');
91+
$ignoredElements = [];
92+
foreach ($files as $filePath) {
93+
$ignoredElements = array_merge_recursive(
94+
$ignoredElements,
95+
json_decode(file_get_contents($filePath), true)
96+
);
97+
}
9098

9199
return $this->arrayRecursiveDiff($undeclaredElements, $ignoredElements);
92100
}

dev/tests/integration/testsuite/Magento/Setup/Declaration/_files/ignore_whitelisting.json

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"patch_list": {
3+
"constraint": [
4+
"PRIMARY"
5+
]
6+
}
7+
}

0 commit comments

Comments
 (0)