Skip to content

Commit

Permalink
Merge branch 'MDL-66979' of git://github.com/stronk7/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Jan 28, 2021
2 parents 2eebe68 + 6531019 commit fec3a69
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/tests/behat/behat_hooks.php
Expand Up @@ -303,11 +303,13 @@ protected function restart_session(): void {
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,
]);
}
}

/**
Expand Down

0 comments on commit fec3a69

Please sign in to comment.