Skip to content

Commit 1757a89

Browse files
committed
MC-31920: Let Magento\Framework\Lock\Backend\Database have 2 locks in single connection
- Move reinitStores after clearConfig to get correct config when emulate work without db with db lock manager as a primary lock manager. Otherwise db lock manager checks in locks if db is available and it is but it's not what is expected when emulating work without db.
1 parent 6eac0d1 commit 1757a89

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dev/tests/integration/testsuite/Magento/Store/App/Config/Source/InitialConfigSourceTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ protected function setUp()
7070
$this->config = $this->loadConfig();
7171
$this->envConfig = $this->loadEnvConfig();
7272
$this->loadDumpConfig();
73-
$this->storeManager->reinitStores();
7473
}
7574

7675
/**
@@ -100,6 +99,8 @@ public function testGetWebsites(array $websites, string $defaultWebsite, bool $o
10099
// remove application environment config for emulate work without db
101100
$this->clearConfig(ConfigFilePool::APP_ENV);
102101
}
102+
// reinit stores to get correct updated config
103+
$this->storeManager->reinitStores();
103104
$this->assertEquals($defaultWebsite, $this->storeManager->getWebsite()->getCode());
104105
$this->assertEquals($websites, array_keys($this->storeManager->getWebsites(true, true)), '', 0.0, 10, true);
105106
}

0 commit comments

Comments
 (0)