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 [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$options = [];
|
$options = [
|
||||||
|
'timeout' => 10,
|
||||||
|
];
|
||||||
|
|
||||||
if ($ETag !== '') {
|
if ($ETag !== '') {
|
||||||
$options['headers'] = [
|
$options['headers'] = [
|
||||||
|
|
|
@ -514,6 +514,7 @@ abstract class FetcherBase extends TestCase {
|
||||||
->with(
|
->with(
|
||||||
$this->equalTo($this->endpoint),
|
$this->equalTo($this->endpoint),
|
||||||
$this->equalTo([
|
$this->equalTo([
|
||||||
|
'timeout' => 10,
|
||||||
'headers' => [
|
'headers' => [
|
||||||
'If-None-Match' => '"myETag"'
|
'If-None-Match' => '"myETag"'
|
||||||
]
|
]
|
||||||
|
@ -585,6 +586,7 @@ abstract class FetcherBase extends TestCase {
|
||||||
->with(
|
->with(
|
||||||
$this->equalTo($this->endpoint),
|
$this->equalTo($this->endpoint),
|
||||||
$this->equalTo([
|
$this->equalTo([
|
||||||
|
'timeout' => 10,
|
||||||
'headers' => [
|
'headers' => [
|
||||||
'If-None-Match' => '"myETag"',
|
'If-None-Match' => '"myETag"',
|
||||||
]
|
]
|
||||||
|
@ -670,7 +672,9 @@ abstract class FetcherBase extends TestCase {
|
||||||
->method('get')
|
->method('get')
|
||||||
->with(
|
->with(
|
||||||
$this->equalTo($this->endpoint),
|
$this->equalTo($this->endpoint),
|
||||||
$this->equalTo([])
|
$this->equalTo([
|
||||||
|
'timeout' => 10,
|
||||||
|
])
|
||||||
)
|
)
|
||||||
->willReturn($response);
|
->willReturn($response);
|
||||||
$response->method('getStatusCode')
|
$response->method('getStatusCode')
|
||||||
|
|
Loading…
Reference in New Issue