@@ -519,7 +519,7 @@ public function scrollToTopOfPage()
519519 */
520520 public function magentoCLI ($ command , $ arguments = null , $ timeout = null )
521521 {
522- return $ this ->curlExecMagentoCLI ($ command , $ arguments , $ timeout );
522+ return $ this ->curlExecMagentoCLI ($ command , $ arguments , $ timeout );
523523 //TODO: calling bin/magento from pipeline is timing out, needs investigation (ref: MQE-1774)
524524// try {
525525// return $this->shellExecMagentoCLI($command, $arguments);
@@ -673,19 +673,19 @@ public function fillSecretField($field, $value)
673673 * Function used to create data that contains sensitive credentials in a <createData> <field> override.
674674 * The data is decrypted immediately prior to data creation to avoid exposure in console or log.
675675 *
676- * @param string $command
677- * @param null $arguments
678- * @param int $timeout
676+ * @param string $command
677+ * @param null $arguments
678+ * @param null $timeout
679679 * @throws TestFrameworkException
680680 * @return string
681681 */
682- public function magentoCLISecret ($ command , $ timeout , $ arguments = null )
682+ public function magentoCLISecret ($ command , $ arguments = null , $ timeout = null )
683683 {
684684 // to protect any secrets from being printed to console the values are executed only at the webdriver level as a
685685 // decrypted value
686686
687687 $ decryptedCommand = CredentialStore::getInstance ()->decryptAllSecretsInString ($ command );
688- return $ this ->magentoCLI ($ decryptedCommand , $ timeout , $ arguments );
688+ return $ this ->magentoCLI ($ decryptedCommand , $ arguments , $ timeout );
689689 }
690690
691691 /**
@@ -837,20 +837,21 @@ public function makeScreenshot($name = null)
837837 /**
838838 * Takes given $command and executes it against bin/magento executable. Returns stdout output from the command.
839839 *
840- * @param string $command
841- * @param string $arguments
840+ * @param string $command
841+ * @param string $arguments
842+ * @param integer $timeout
842843 *
843844 * @throws \RuntimeException
844845 * @return string
845846 * @SuppressWarnings(PHPMD.UnusedPrivateMethod)
846847 */
847- private function shellExecMagentoCLI ($ command , $ arguments ): string
848+ private function shellExecMagentoCLI ($ command , $ arguments, $ timeout ): string
848849 {
849850 $ php = PHP_BINDIR ? PHP_BINDIR . DIRECTORY_SEPARATOR . 'php ' : 'php ' ;
850851 $ binMagento = realpath (MAGENTO_BP . DIRECTORY_SEPARATOR . 'bin ' . DIRECTORY_SEPARATOR . 'magento ' );
851852 $ command = $ php . ' -f ' . $ binMagento . ' ' . $ command . ' ' . $ arguments ;
852853 $ process = new Process (escapeshellcmd ($ command ), MAGENTO_BP );
853- $ process ->setIdleTimeout (60 );
854+ $ process ->setIdleTimeout ($ timeout );
854855 $ process ->setTimeout (0 );
855856 $ exitCode = $ process ->run ();
856857 if ($ exitCode !== 0 ) {
@@ -867,9 +868,10 @@ private function shellExecMagentoCLI($command, $arguments): string
867868 * @param string $arguments
868869 * @param integer $timeout
869870 *
871+ * @return string
870872 * @throws TestFrameworkException
871873 */
872- private function curlExecMagentoCLI ($ command , $ arguments , $ timeout ): string
874+ private function curlExecMagentoCLI ($ command , $ arguments , $ timeout ): string
873875 {
874876 // Remove index.php if it's present in url
875877 $ baseUrl = rtrim (
0 commit comments