Skip to content

Commit

Permalink
update timeout, add default message to exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuriy Khabarov committed May 22, 2018
1 parent d20b3c3 commit b7b1d88
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use GuzzleHttp\Exception\{
ConnectException, GuzzleException
};
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\Psr7\Response;
use InvalidArgumentException;

Expand All @@ -23,7 +22,7 @@ class Api
const METHOD_GET = 'GET';
const METHOD_POST = 'POST';
const METHOD_PUT = 'PUT';
const TIMEOUT = 5;
const TIMEOUT = 10;
const URL_PREFIX = '/v1/';

/** @var Endpoints */
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/DkronNoAvailableServersException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

class DkronNoAvailableServersException extends DkronException
{

protected $message = 'No available dkron agent';
}
2 changes: 1 addition & 1 deletion tests/EndpointsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ public function testMethodGetAvailableEndpoint()
}

// handle exception if no endpoints available
$this->expectException(DkronNoAvailableServersException::class);
foreach ($endpoints as $endpoint) {
$instance->setEndpointAsUnavailable($endpoint);
}
$this->expectException(DkronNoAvailableServersException::class);
$instance->getAvailableEndpoint();
}

Expand Down

0 comments on commit b7b1d88

Please sign in to comment.