From 160f67d68300cb5bc49f305c16c0d4da5d551821 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 10 Aug 2015 15:58:50 +0200 Subject: adapt tests to strict comparison --- tests/it_url_slow.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/it_url_slow.t') diff --git a/tests/it_url_slow.t b/tests/it_url_slow.t index 74440ce..aa85a80 100755 --- a/tests/it_url_slow.t +++ b/tests/it_url_slow.t @@ -21,7 +21,7 @@ $res = ok( 'it_url::get() fails after timeout seconds with no output', ); $res2 = is( - floor(microtime(true) - $start), 5, + intval(microtime(true) - $start), 5, '... and fails as soon as timeout is surpassed', ); sleep(1); # wait for testserver @@ -43,7 +43,7 @@ $res = ok( '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 -- cgit v1.2.3 From 21205b1d20a4c0325e3b4484f1501078f6dd6846 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 10 Aug 2015 16:01:12 +0200 Subject: php 5.3 compatibility --- tests/it_url_slow.t | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/it_url_slow.t') diff --git a/tests/it_url_slow.t b/tests/it_url_slow.t index aa85a80..22aae10 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( intval(microtime(true) - $start), 5, - '... and fails as soon as timeout is surpassed', + '... and fails as soon as timeout is surpassed' ); sleep(1); # wait for testserver $output = server_output(); @@ -33,14 +33,14 @@ 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( intval(microtime(true) - $start), 5, @@ -54,7 +54,7 @@ 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() handles large response' ) ); -- cgit v1.2.3 From 28ddc800b720c62fe2acc12e2bce88c0b4efaad8 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 10 Aug 2015 16:04:53 +0200 Subject: php 5.3 compatibility --- tests/it_url_slow.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/it_url_slow.t') diff --git a/tests/it_url_slow.t b/tests/it_url_slow.t index 22aae10..1dc3d78 100755 --- a/tests/it_url_slow.t +++ b/tests/it_url_slow.t @@ -53,7 +53,7 @@ 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(U('http://localhost:8000/repeat', 'string' => "abc", array('num' => 1024 * 1024))) == str_repeat("abc", 1024 * 1024), 'it_url::get() handles large response' ) ); -- cgit v1.2.3 From b26fcf8a18d32a49728516d4cdcb41c4f2ae8c93 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 10 Aug 2015 16:06:24 +0200 Subject: php 5.3 compatibility --- tests/it_url_slow.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/it_url_slow.t') diff --git a/tests/it_url_slow.t b/tests/it_url_slow.t index 1dc3d78..68d68c1 100755 --- a/tests/it_url_slow.t +++ b/tests/it_url_slow.t @@ -53,7 +53,7 @@ if (!$res || !$res2) handle_server( ok( - it_url::get(U('http://localhost:8000/repeat', 'string' => "abc", array('num' => 1024 * 1024))) == str_repeat("abc", 1024 * 1024), + 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' ) ); -- cgit v1.2.3