From f74f04a864158aae028a863b4af09c45247a044e Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Sat, 29 Oct 2005 18:16:39 +0000 Subject: [PATCH] - fix tests --- tests/HttpRequestPool_003.phpt | 19 +++++++++++-------- tests/chunked_decode_003.phpt | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/tests/HttpRequestPool_003.phpt b/tests/HttpRequestPool_003.phpt index c89efa4..48f6adf 100644 --- a/tests/HttpRequestPool_003.phpt +++ b/tests/HttpRequestPool_003.phpt @@ -2,7 +2,7 @@ HttpRequestPool chain --SKIPIF-- @@ -48,8 +48,9 @@ class Pool extends HttpRequestPool HttpRequest::METH_GET, array( 'redirect' => 5, - 'timeout' => 50, - 'connecttimeout' => 10, + 'compress' => GZIP, + 'timeout' => TOUT, + 'connecttimeout' => TOUT, 'lastmodified' => is_file($file)?filemtime($file):0 ) ) @@ -93,10 +94,10 @@ class Pool extends HttpRequestPool $url, HttpRequest::METH_GET, array( - 'redirect' => 3, - 'timeout' => 25, - 'compress' => true, - 'connecttimeout' => 10, + 'redirect' => 5, + 'compress' => GZIP, + 'timeout' => TOUT, + 'connecttimeout' => TOUT, 'lastmodified' => is_file($file)?filemtime($file):0 ) ) @@ -107,11 +108,13 @@ class Pool extends HttpRequestPool } } +define('GZIP', true); +define('TOUT', 50); define('RMAX', 10); chdir(dirname(__FILE__)); $time = microtime(true); -new Pool(); +$p = new Pool(); printf("Elapsed: %0.3fs\n", microtime(true)-$time); echo "Done\n"; diff --git a/tests/chunked_decode_003.phpt b/tests/chunked_decode_003.phpt index 5af29a4..0081bbe 100644 --- a/tests/chunked_decode_003.phpt +++ b/tests/chunked_decode_003.phpt @@ -20,7 +20,7 @@ var_dump(http_chunked_decode($data)); ?> --EXPECTF-- %sTEST -%sWarning%s:%shttp_chunked_decode()%sTruncated message: chunk size %d exceeds remaining data size %d at pos %d of %d%s +%sWarning%shttp_chunked_decode()%sTruncated message: chunk size 255 exceeds remaining data size 12 at pos 34 of 46 in%s string(24) "abra cadabra all we got -- 2.30.2