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.
This commit is contained in:
committed by
Andrew Nicols
parent
e631b8c5e1
commit
909f1d7203
@@ -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,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user