Skip to content

Commit

Permalink
Fix testHttpTimeout
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavid committed Feb 5, 2021
1 parent 03a3541 commit 4b5c2a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/AblyRestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -398,13 +398,13 @@ public function testHttpTimeout() {

$ablyTimeout = new AblyRest( [
'key' => 'fake.key:veryFake',
'httpRequestTimeout' => 50, // 50 ms
'httpRequestTimeout' => 20, // 20 ms
]);

$ably->http->get('https://cdn.ably.io/lib/ably.js'); // should work
$this->expectException(AblyRequestException::class);
$this->expectExceptionCode(50003);
$ablyTimeout->http->get('https://cdn.ably.io/lib/ably.js'); // guaranteed to take more than 50 ms
$ablyTimeout->http->get('https://cdn.ably.io/lib/ably.js'); // guaranteed to take more than 20 ms
}
}

Expand Down

0 comments on commit 4b5c2a7

Please sign in to comment.