mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-22 13:39:24 -06:00
tests: add 60 seconds timeout for the API requests (#7905)
This commit is contained in:
@@ -368,7 +368,7 @@ class HttpRequestHelper {
|
||||
}
|
||||
$options['stream'] = $stream;
|
||||
$options['verify'] = false;
|
||||
$options['timeout'] = $timeout;
|
||||
$options['timeout'] = $timeout ?: self::getRequestTimeout();
|
||||
return new Client($options);
|
||||
}
|
||||
|
||||
@@ -677,4 +677,12 @@ class HttpRequestHelper {
|
||||
}
|
||||
return $parsedResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public static function getRequestTimeout(): int {
|
||||
$timeout = \getenv("REQUEST_TIMEOUT");
|
||||
return (int)$timeout ?: 60;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user