Skip to content

Commit e380b91

Browse files
committed
AC-6720::Cloud Native S3 Web API test Failures -2.4-develop - Remove shared instance during application Initialization
1 parent 2782133 commit e380b91

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

dev/tests/api-functional/framework/Magento/TestFramework/TestCase/GraphQlAbstract.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ protected function runTest()
254254
$initialConfig = $this->envConfigReader->load(ConfigFilePool::APP_ENV);
255255

256256
try {
257-
$testResult = parent::runTest();
257+
return parent::runTest();
258258
} finally {
259259
$this->formatter = $this->formatter ?: new PhpFormatter();
260260
$this->filesystem = $this->filesystem ?: Bootstrap::getObjectManager()->get(Filesystem::class);
@@ -263,11 +263,8 @@ protected function runTest()
263263
$resetConfig = $this->resetAddedSection($initialConfig, $currentConfig, $cacheSaltPathChunks);
264264
$resetFileContents = $this->formatter->format($resetConfig);
265265
$directoryWrite = $this->filesystem->getDirectoryWrite(DirectoryList::CONFIG);
266-
sleep(4);
267266
$directoryWrite->writeFile($this->envConfigPath, $resetFileContents);
268267
}
269-
270-
return $testResult;
271268
}
272269

273270
/**

dev/tests/api-functional/framework/Magento/TestFramework/WebApiApplication.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,19 @@ public function install($cleanup)
5454
$this->runPostInstallCommands();
5555
}
5656

57+
/**
58+
* Initialize application
59+
*
60+
* @param array $overriddenParams
61+
* @return void
62+
*/
63+
public function initialize($overriddenParams = [])
64+
{
65+
parent::initialize($overriddenParams);
66+
$objectManager = Helper\Bootstrap::getObjectManager();
67+
$objectManager->removeSharedInstance(\Magento\Framework\App\DeploymentConfig::class);
68+
}
69+
5770
/**
5871
* @inheritdoc
5972
*

dev/tests/api-functional/testsuite/Magento/GraphQl/GraphQlCache/CacheIdFactorProviders/Store/CurrencyProviderTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
/**
1212
* Test class for currency CacheIdFactorProvider.
13-
* @magentoAppIsolation enabled
1413
*/
1514
class CurrencyProviderTest extends GraphQlAbstract
1615
{

0 commit comments

Comments
 (0)