Skip to content
Snippets Groups Projects
Commit 48a9a4bd authored by Lukas Reschke's avatar Lukas Reschke Committed by GitHub
Browse files

Merge pull request #4825 from nextcloud/add-timeout-appstore

Add timeout for requests to appstore
parents 98a7b346 adad4281
No related branches found
No related tags found
No related merge requests found
...@@ -85,7 +85,9 @@ abstract class Fetcher { ...@@ -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 { ...@@ -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 { ...@@ -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 { ...@@ -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')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment