Skip to content

Commit 50d9cd2

Browse files
committed
MQE-1902: Running bin/magento from MagentoWebDriver causing timeout issues on pipeline
Reverted changes, build still hangs with starting cron process from shell.
1 parent dea0c05 commit 50d9cd2

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,9 @@ public function magentoCLI($command, $timeout = null, $arguments = null)
525525
{
526526
$magentoBinary = realpath(MAGENTO_BP . DIRECTORY_SEPARATOR . 'bin' . DIRECTORY_SEPARATOR . 'magento');
527527
$valid = $this->validateCommand($magentoBinary, $command);
528-
// execute from shell when running tests from web root.
529-
if ($valid) {
528+
// execute from shell when running tests from web root -- excluding cron
529+
//TODO: investigate why cron:run hangs with shell execution on pipeline
530+
if ($valid && ($command !== self::COMMAND_CRON_RUN)) {
530531
return $this->shellExecMagentoCLI($magentoBinary, $command, $timeout, $arguments);
531532
} else {
532533
return $this->curlExecMagentoCLI($command, $timeout, $arguments);
@@ -859,13 +860,11 @@ private function shellExecMagentoCLI($magentoBinary, $command, $timeout, $argume
859860
$process->setTimeout(0);
860861
try {
861862
$process->run();
862-
if (strpos($command, self::COMMAND_CRON_RUN) === false) {
863-
$output = $process->getOutput();
864-
if (!$process->isSuccessful()) {
865-
$failureOutput = $process->getErrorOutput();
866-
if (!empty($failureOutput)) {
867-
$output = $failureOutput;
868-
}
863+
$output = $process->getOutput();
864+
if (!$process->isSuccessful()) {
865+
$failureOutput = $process->getErrorOutput();
866+
if (!empty($failureOutput)) {
867+
$output = $failureOutput;
869868
}
870869
}
871870
if (empty($output)) {

0 commit comments

Comments
 (0)