From: Michael Wallner Date: Wed, 23 Oct 2024 13:08:15 +0000 (+0200) Subject: attempt to fix test on curl-master X-Git-Tag: v4.2.6~3 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=45eb80abc93eefe8e400b7dc77afe0c2be2f05b9;p=m6w6%2Fext-http attempt to fix test on curl-master --- diff --git a/tests/client028.phpt b/tests/client028.phpt index 482fc6c..67863c1 100644 --- a/tests/client028.phpt +++ b/tests/client028.phpt @@ -71,10 +71,10 @@ class UserHandler implements http\Client\Curl\User function once() { echo "O"; - foreach ($this->W as $w) { + foreach ($this->W as $w) if (is_resource($w)) { call_user_func($this->run, $this->client, $w, self::POLL_OUT); } - foreach ($this->R as $r) { + foreach ($this->R as $r) if (is_resource($r)) { call_user_func($this->run, $this->client, $r, self::POLL_IN); } return count($this->client); diff --git a/tests/gh-issue50.phpt b/tests/gh-issue50.phpt index 57cbd9a..4db06fe 100644 --- a/tests/gh-issue50.phpt +++ b/tests/gh-issue50.phpt @@ -35,7 +35,7 @@ Test http\Exception\RuntimeException: http\Client::dequeue(): Could not dequeue request while executing callbacks in %sgh-issue50.php:9 Stack trace: #0 %sgh-issue50.php(9): http\Client->dequeue(Object(http\Client\Request)) -#1 [internal function]: {closure}(Object(http\Client), Object(http\Client\Request), 18, 'GET / HTTP/1.1%s...') +#1 [internal function]: {closur%s}(Object(http\Client), Object(http\Client\Request), 18, 'GET / HTTP/1.1%s...') #2 %sgh-issue50.php(14): http\Client->send() #3 {main} ===DONE=== diff --git a/tests/helper/server.inc b/tests/helper/server.inc index b5bc3b7..3046448 100644 --- a/tests/helper/server.inc +++ b/tests/helper/server.inc @@ -83,7 +83,7 @@ function serve($cb) { logger("serve: Using port %d", $port); do { $R = array($server); $W = array(); $E = array(); - $select = stream_select($R, $E, $E, 10, 0); + $select = stream_select($R, $E, $E, 1, 0); if ($select && ($client = stream_socket_accept($server, 1))) { logger("serve: Accept client %d", (int) $client); if (getenv("PHP_HTTP_TEST_SSL")) {