Skip to content

Commit 6b27aae

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

File tree

2 files changed

+3
-19
lines changed

2 files changed

+3
-19
lines changed

src/Magento/FunctionalTestingFramework/Console/GenerateTestFailedCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
7474
$testConfiguration = $this->getFailedTestList();
7575

7676
if ($testConfiguration === null) {
77-
// no failed tests found, run is a success
77+
// No failed tests found, no tests generated
7878
return 0;
7979
}
8080

@@ -89,7 +89,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
8989
];
9090
$command->run(new ArrayInput($args), $output);
9191
$output->writeln("Test Failed Generated, now run:failed command");
92-
return 1;
92+
return 0;
9393
}
9494

9595
/**

src/Magento/FunctionalTestingFramework/Console/RunTestFailedCommand.php

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@
1818

1919
class RunTestFailedCommand extends BaseGenerateCommand
2020
{
21-
/**
22-
* Default Test group to signify not in suite
23-
*/
24-
const DEFAULT_TEST_GROUP = 'default';
25-
2621
/**
2722
* @var string
2823
*/
@@ -61,7 +56,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
6156
{
6257
$this->testsFailedFile = $this->getTestsOutputDir() . self::FAILED_FILE;
6358
$this->testsReRunFile = $this->getTestsOutputDir() . "rerun_tests";
64-
$failedTestList = $this->readFailedTestFile($this->testsFailedFile);
6559

6660
$this->testsManifestFile= FilePathFormatter::format(TESTS_MODULE_PATH) .
6761
"_generated" .
@@ -71,9 +65,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
7165
$testManifestList = $this->readTestManifestFile();
7266
$returnCode = 0;
7367
for ($i = 0; $i < count($testManifestList); $i++) {
74-
if (in_array($testManifestList[$i], $failedTestList) === false) {
75-
continue;
76-
}
7768
if ($this->pauseEnabled()) {
7869
$codeceptionCommand = self::CODECEPT_RUN_FUNCTIONAL . $testManifestList[$i] . ' --debug ';
7970
if ($i !== count($testManifestList) - 1) {
@@ -129,14 +120,7 @@ private function readTestManifestFile()
129120
*/
130121
private function readFailedTestFile($filePath)
131122
{
132-
$failedTests = file($filePath, FILE_IGNORE_NEW_LINES);
133-
if ($failedTests !== false) {
134-
foreach ($failedTests as $key => $failedTest) {
135-
list($filePath) = explode(":", $failedTest);
136-
$failedTests[$key] = $filePath;
137-
}
138-
}
139-
return $failedTests;
123+
return file($filePath, FILE_IGNORE_NEW_LINES);
140124
}
141125

142126
/**

0 commit comments

Comments
 (0)