summaryrefslogtreecommitdiff
path: root/tests/it_url_slow.t
diff options
context:
space:
mode:
authorChristian Schneider2015-08-12 15:27:39 +0200
committerChristian Schneider2015-08-12 15:27:39 +0200
commit1c0a580ec4de036530b08a83d5ddc2d915bdfd0b (patch)
treeda17deffd92927957246b5f3cb13393c853f0446 /tests/it_url_slow.t
parent0bb7f6148acb2a4a4d2caaa83c9ffa5b27aa8e1c (diff)
parent79d5a50477ed74940484a5ca046dfa04adce1550 (diff)
downloaditools-1c0a580ec4de036530b08a83d5ddc2d915bdfd0b.tar.gz
itools-1c0a580ec4de036530b08a83d5ddc2d915bdfd0b.tar.bz2
itools-1c0a580ec4de036530b08a83d5ddc2d915bdfd0b.zip
Merge branch 'master' into cs/php7
Diffstat (limited to 'tests/it_url_slow.t')
-rwxr-xr-xtests/it_url_slow.t18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/it_url_slow.t b/tests/it_url_slow.t
index 74440ce..68d68c1 100755
--- a/tests/it_url_slow.t
+++ b/tests/it_url_slow.t
@@ -11,18 +11,18 @@ handle_server(
is(
it_url::get('http://localhost:8000/short_sleep'),
"Testserver output after short sleep",
- 'it_url::get() waits for 4 seconds',
+ 'it_url::get() waits for 4 seconds'
)
);
$start = microtime(true);
$res = ok(
!it_url::get(array('url' => 'http://localhost:8000/long_sleep', 'timeout' => 5, 'retries' => 0)),
- 'it_url::get() fails after timeout seconds with no output',
+ 'it_url::get() fails after timeout seconds with no output'
);
$res2 = is(
- floor(microtime(true) - $start), 5,
- '... and fails as soon as timeout is surpassed',
+ intval(microtime(true) - $start), 5,
+ '... and fails as soon as timeout is surpassed'
);
sleep(1); # wait for testserver
$output = server_output();
@@ -33,17 +33,17 @@ handle_server(
is(
it_url::get('http://localhost:8000/slow_response'),
join('', it::map('"Testserver slow output $v\n"', range(0, 5))),
- 'it_url::get() waits for slow response with continuous output',
+ 'it_url::get() waits for slow response with continuous output'
)
);
$start = microtime(true);
$res = ok(
!it_url::get(array('url' => 'http://localhost:8000/slow_response', 'totaltimeout' => 5, 'retries' => 0)),
- 'it_url::get() fails for response slower than totaltimeout',
+ 'it_url::get() fails for response slower than totaltimeout'
);
$res2 = is(
- floor(microtime(true) - $start), 5,
+ intval(microtime(true) - $start), 5,
'... and fails as soon as totaltimeout is surpassed'
);
sleep(1); # wait for testserver
@@ -53,8 +53,8 @@ if (!$res || !$res2)
handle_server(
ok(
- it_url::get(U('http://localhost:8000/repeat', 'string' => "abc", 'num' => 1024 * 1024)) == str_repeat("abc", 1024 * 1024),
- 'it_url::get() handles large response',
+ it_url::get(U('http://localhost:8000/repeat', array('string' => "abc", 'num' => 1024 * 1024))) == str_repeat("abc", 1024 * 1024),
+ 'it_url::get() handles large response'
)
);