Skip to content

Commit 590c586

Browse files
committed
Fix layout xml and page layout caching issue on redis cluster under high load
-Fixed static tests
1 parent cdefb91 commit 590c586

File tree

1 file changed

+3
-1
lines changed
  • dev/tests/integration/testsuite/Magento/Framework/View/Layout

1 file changed

+3
-1
lines changed

dev/tests/integration/testsuite/Magento/Framework/View/Layout/MergeTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ class MergeTest extends \PHPUnit\Framework\TestCase
7979
protected function setUp()
8080
{
8181
$files = [];
82-
foreach (glob(__DIR__ . '/_mergeFiles/layout/*.xml') as $filename) {
82+
$fileDriver = new \Magento\Framework\Filesystem\Driver\File();
83+
foreach ($fileDriver->readDirectory(__DIR__ . '/_mergeFiles/layout/') as $filename) {
8384
$files[] = new \Magento\Framework\View\File($filename, 'Magento_Widget');
8485
}
8586
$fileSource = $this->getMockForAbstractClass(\Magento\Framework\View\File\CollectorInterface::class);
@@ -439,6 +440,7 @@ public function testLoadWithInvalidLayout()
439440
->method('isValid')
440441
->willThrowException(new \Exception('Layout is invalid.'));
441442

443+
// phpcs:ignore Magento2.Security.InsecureFunction
442444
$suffix = md5(implode('|', $this->_model->getHandles()));
443445
$cacheId = "LAYOUT_{$this->_theme->getArea()}_STORE{$this->scope->getId()}"
444446
. "_{$this->_theme->getId()}{$suffix}_page_layout_merged";

0 commit comments

Comments
 (0)