Merge pull request #4825 from nextcloud/add-timeout-appstore
Add timeout for requests to appstore
This commit is contained in:
commit
48a9a4bd81
|
@ -85,7 +85,9 @@ abstract class Fetcher {
|
|||
return [];
|
||||
}
|
||||
|
||||
$options = [];
|
||||
$options = [
|
||||
'timeout' => 10,
|
||||
];
|
||||
|
||||
if ($ETag !== '') {
|
||||
$options['headers'] = [
|
||||
|
|
|
@ -514,6 +514,7 @@ abstract class FetcherBase extends TestCase {
|
|||
->with(
|
||||
$this->equalTo($this->endpoint),
|
||||
$this->equalTo([
|
||||
'timeout' => 10,
|
||||
'headers' => [
|
||||
'If-None-Match' => '"myETag"'
|
||||
]
|
||||
|
@ -585,6 +586,7 @@ abstract class FetcherBase extends TestCase {
|
|||
->with(
|
||||
$this->equalTo($this->endpoint),
|
||||
$this->equalTo([
|
||||
'timeout' => 10,
|
||||
'headers' => [
|
||||
'If-None-Match' => '"myETag"',
|
||||
]
|
||||
|
@ -670,7 +672,9 @@ abstract class FetcherBase extends TestCase {
|
|||
->method('get')
|
||||
->with(
|
||||
$this->equalTo($this->endpoint),
|
||||
$this->equalTo([])
|
||||
$this->equalTo([
|
||||
'timeout' => 10,
|
||||
])
|
||||
)
|
||||
->willReturn($response);
|
||||
$response->method('getStatusCode')
|
||||
|
|
Loading…
Reference in New Issue