summaryrefslogtreecommitdiff
path: root/test/it_url_slow.t
diff options
context:
space:
mode:
authorNathan Gass2019-04-02 18:53:05 +0200
committerNathan Gass2019-04-02 18:53:05 +0200
commit09e994d923af3c9f72792b12c6bff1f797084a8c (patch)
tree78c42f9305a8f29b6892fe3408102de899cbd5da /test/it_url_slow.t
parenta706afe8b32ed708b04a91c78d66f6faacbd4740 (diff)
downloaditools-09e994d923af3c9f72792b12c6bff1f797084a8c.tar.gz
itools-09e994d923af3c9f72792b12c6bff1f797084a8c.tar.bz2
itools-09e994d923af3c9f72792b12c6bff1f797084a8c.zip
add test for get_multi handler returning true
Diffstat (limited to 'test/it_url_slow.t')
-rwxr-xr-xtest/it_url_slow.t5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/it_url_slow.t b/test/it_url_slow.t
index 32f0963..04377c5 100755
--- a/test/it_url_slow.t
+++ b/test/it_url_slow.t
@@ -57,3 +57,8 @@ handle_server(
'it_url::get() handles large response'
)
);
+
+$start = microtime(true);
+it_url::get_multi(array('urls' => array('slow' => 'http://localhost:8000/long_sleep', 'fast' => array('url' => 'http://search.ch/', 'handler' => function () {return true;}))));
+ok(intval(microtime(true) - $start) < 4, 'get_multi with handler aborts after fast request');
+$output = server_output();