summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/it_url_slow.t7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/it_url_slow.t b/test/it_url_slow.t
index 1f43edc..b131322 100755
--- a/test/it_url_slow.t
+++ b/test/it_url_slow.t
@@ -17,11 +17,12 @@ handle_server(
$start = microtime(true);
$res = ok(
- !it_url::get(['url' => 'http://localhost:8000/long_sleep', 'timeout' => 5, 'retries' => 0, 'it_error' => false]),
+ !it_url::get(['url' => 'http://localhost:8000/long_sleep', 'timeout' => 4, 'retries' => 0, 'it_error' => false]),
'it_url::get() fails after timeout seconds with no output'
);
-$res2 = is(
- intval(microtime(true) - $start), 5,
+$duration = microtime(true) - $start;
+$res2 = ok(
+ $duration >= 4 && $duration <= 6,
'... and fails as soon as timeout is surpassed'
);
sleep(1); # wait for testserver