From a7d8af4a9e7194e5d4430ab5472a46c4d91b0ae3 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Sun, 31 Jan 2021 18:21:41 +0800 Subject: [PATCH] MDL-70734 behat: Increase the WebDriver Curl timeout --- lib/behat/classes/behat_session_trait.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/behat/classes/behat_session_trait.php b/lib/behat/classes/behat_session_trait.php index 4d1a39fff26..ebded0b9d61 100644 --- a/lib/behat/classes/behat_session_trait.php +++ b/lib/behat/classes/behat_session_trait.php @@ -1369,11 +1369,9 @@ EOF; return; } - // Use `get_real_timeout` to multiply the timeout by the global behat_increasetimeout value, and again by the - // factor specified. - $this->getSession()->getDriver()->setTimeouts([ - // The standard script timeout is 30000 ms. (aka, 30 seconds). - 'script' => self::get_real_timeout(30) * 1000 * $factor, - ]); + // The standard curl timeout is 30 seconds. + // Use get_real_timeout and multiply by the timeout factor to get the final timeout. + $timeout = self::get_real_timeout(30) * 1000 * $factor; + $driver->getWebDriver()->getCommandExecutor()->setRequestTimeout($timeout); } }