From 09e994d923af3c9f72792b12c6bff1f797084a8c Mon Sep 17 00:00:00 2001 From: Nathan Gass Date: Tue, 2 Apr 2019 18:53:05 +0200 Subject: add test for get_multi handler returning true --- test/it_url_slow.t | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') 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(); -- cgit v1.2.3