Skip to content

Commit cfec610

Browse files
committed
ACQE-5871: Add ability to increase default MagentoCLI timeout
1 parent 9b63092 commit cfec610

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Diff for: etc/config/command.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
$tokenPassedIn = urldecode($_POST['token'] ?? '');
1515
$command = urldecode($_POST['command'] ?? '');
1616
$arguments = urldecode($_POST['arguments'] ?? '');
17-
$timeout = floatval(urldecode($_POST['timeout'] ?? getenv('MAGENTO_CLI_WAIT_TIMEOUT')));
17+
$timeout = floatval(urldecode($_POST['timeout'] ?? 60));
1818

1919
// Token returned will be null if the token we passed in is invalid
2020
$tokenFromMagento = $tokenModel->loadByToken($tokenPassedIn)->getToken();

Diff for: src/Magento/FunctionalTestingFramework/Module/MagentoWebDriver.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -530,9 +530,9 @@ public function scrollToTopOfPage()
530530
/**
531531
* Takes given $command and executes it against bin/magento or custom exposed entrypoint. Returns command output.
532532
*
533-
* @param string $command
534-
* @param integer $timeout
535-
* @param string $arguments
533+
* @param string $command
534+
* @param integer|null $timeout
535+
* @param string|null $arguments
536536
* @return string
537537
*
538538
* @throws TestFrameworkException
@@ -846,9 +846,9 @@ public function fillSecretField($field, $value)
846846
* Function used to create data that contains sensitive credentials in a <createData> <field> override.
847847
* The data is decrypted immediately prior to data creation to avoid exposure in console or log.
848848
*
849-
* @param string $command
850-
* @param null $timeout
851-
* @param null $arguments
849+
* @param string $command
850+
* @param integer|null $timeout
851+
* @param string|null $arguments
852852
* @throws TestFrameworkException
853853
* @return string
854854
*/

Diff for: src/Magento/FunctionalTestingFramework/Test/Objects/ActionObject.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public static function getDefaultWaitTimeout()
192192
public static function getDefaultMagentoCLIWaitTimeout()
193193
{
194194
$timeout = getenv('MAGENTO_CLI_WAIT_TIMEOUT');
195-
return $timeout !== false ? $timeout : self::DEFAULT_COMMAND_WAIT_TIMEOUT;
195+
return !empty($timeout) ? $timeout : self::DEFAULT_COMMAND_WAIT_TIMEOUT;
196196
}
197197

198198
/**

0 commit comments

Comments
 (0)