Skip to content

Commit dccf388

Browse files
committed
MQE-2669: bin/mftf run:failed process used a lot of RAM during MTSv1 build
1 parent 402c3fb commit dccf388

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/Magento/FunctionalTestingFramework/Console/GenerateTestFailedCommand.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
7575

7676
if ($testConfiguration === null) {
7777
// No failed tests found, no tests generated
78+
$this->removeGeneratedDirectory($output, $verbose);
7879
return 0;
7980
}
8081

src/Magento/FunctionalTestingFramework/Console/RunTestFailedCommand.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int
6868
"testManifest.txt";
6969

7070
$testManifestList = $this->readTestManifestFile();
71+
if ($testManifestList === false) {
72+
// If there is no test manifest file then we have nothing to execute.
73+
return 0;
74+
}
7175
$returnCode = 0;
7276
for ($i = 0; $i < count($testManifestList); $i++) {
7377
if ($this->pauseEnabled()) {
@@ -150,7 +154,10 @@ function ($type, $buffer) use ($output) {
150154
*/
151155
private function readTestManifestFile()
152156
{
153-
return file($this->testsManifestFile, FILE_IGNORE_NEW_LINES);
157+
if (file_exists($this->testsManifestFile)) {
158+
return file($this->testsManifestFile, FILE_IGNORE_NEW_LINES);
159+
}
160+
return false;
154161
}
155162

156163
/**

0 commit comments

Comments
 (0)