Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- commit 8f5758c583b923c6ad5a053a9e11513c16f33b45 (HEAD -> MOODLE_39_STABLE)
- Author: Eloy Lafuente (stronk7) <stronk7@moodle.org>
- Date: Thu Jan 28 12:12:48 2021 +0100
- MDL-66979 behat: Goutte driver doesn't implement setTimeouts()
- Also, change:
- get_real_timeout(30000)
- to:
- get_real_timeout(30) * 1000
- because the original functions are defined to use seconds, and
- having the 1000 around will help us detecting cases in the case
- of a hypothetical review of uses.
- diff --git a/lib/tests/behat/behat_hooks.php b/lib/tests/behat/behat_hooks.php
- index d2f0bea4c75..36f6a7eb353 100644
- --- a/lib/tests/behat/behat_hooks.php
- +++ b/lib/tests/behat/behat_hooks.php
- @@ -303,11 +303,13 @@ EOF;
- protected function start_session(): void {
- $this->getSession()->start();
- - $this->getSession()->getDriver()->setTimeouts([
- - // The standard script timeout is 30000 ms.
- - // Use `get_real_timeout` to multiply this by the behat increased timeout factor.
- - 'script' => self::get_real_timeout(30000),
- - ]);
- + if ($this->running_javascript()) { // Goutte driver doesn't implement this.
- + $this->getSession()->getDriver()->setTimeouts([
- + // The standard script timeout is 30000 ms. (aka, 30 seconds).
- + // Use `get_real_timeout` to multiply this by the behat increased timeout factor.
- + 'script' => self::get_real_timeout(30) * 1000,
- + ]);
- + }
- }
- /**
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement