X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fpersistent_handles_002.phpt;fp=tests%2Fpersistent_handles_002.phpt;h=0000000000000000000000000000000000000000;hb=87db9817d428282792c8146d9c2ae9748ebf6f1e;hp=5b5d28cf60af23c4f0e40525077284a7b9d760f3;hpb=7a5c865f6faf8b1b6c91735e9d3b040449ea74ba;p=m6w6%2Fext-http diff --git a/tests/persistent_handles_002.phpt b/tests/persistent_handles_002.phpt deleted file mode 100644 index 5b5d28c..0000000 --- a/tests/persistent_handles_002.phpt +++ /dev/null @@ -1,83 +0,0 @@ ---TEST-- -persistent handles ---SKIPIF-- - ---INI-- -http.persistent.handles.limit=-1 -http.persistent.handles.ident=GLOBAL ---FILE-- - $idents) { - foreach ((array)$idents as $ident => $counts) { - if (!empty($counts["free"])) { - printf("%a, %a, %a\n", $provider, $ident, $counts["free"]); - } - } -} - -http_get("http://www.google.com/", null, $info[]); - -echo "One free request handle within GLOBAL: "; -$h = http_persistent_handles_count(); -var_dump($h->http_request["GLOBAL"]["free"]); - -echo "Reusing request handle: "; -http_get("http://www.google.com/", null, $info[]); -var_dump($info[0]["pretransfer_time"] > 10 * $info[1]["pretransfer_time"], $info[0]["pretransfer_time"], $info[1]["pretransfer_time"]); - -echo "Handles' been cleaned up:\n"; -http_persistent_handles_clean(); -print_r(http_persistent_handles_count()); - -echo "Done\n"; -?> ---EXPECTF-- -%aTEST -No free handles! -One free request handle within GLOBAL: int(1) -Reusing request handle: bool(true) -float(%f) -float(%f) -Handles' been cleaned up: -stdClass Object -( - [http_request] => Array - ( - [GLOBAL] => Array - ( - [used] => 0 - [free] => 0 - ) - - ) - - [http_request_datashare] => Array - ( - [GLOBAL] => Array - ( - [used] => 0 - [free] => 0 - ) - - ) - - [http_request_pool] => Array - ( - [GLOBAL] => Array - ( - [used] => 0 - [free] => 0 - ) - - ) - -) -Done