Match number of servers started

This commit is contained in:
Zach Borboa
2021-06-10 12:17:21 -04:00
parent 480e1a54c6
commit ef037f058d
2 changed files with 8 additions and 3 deletions
+2 -2
View File
@@ -3,12 +3,12 @@ require __DIR__ . '/../vendor/autoload.php';
use Curl\MultiCurl;
$server_count = 5;
$server_count = 7;
$urls = array();
$port = 8000;
for ($i = 0; $i < $server_count; $i++) {
$port += 1;
$urls[] = 'http://localhost:' . $port . '/';
$port += 1;
}
$multi_curl = new MultiCurl();
+6 -1
View File
@@ -31,14 +31,19 @@ reload_nginx() {
}
start_php_servers() {
for i in $(seq 0 6); do
# Start test servers. Run servers on different ports to allow simultaneous
# requests without blocking.
server_count=7
for i in $(seq 0 $(("${server_count}" - 1))); do
port=8000
(( port += $i ))
php -S "127.0.0.1:${port}" -t tests/PHPCurlClass/ &
done
}
set -x
echo "CI_PHP_VERSION: ${CI_PHP_VERSION}"
php -r "var_dump(phpversion());"
php -r "var_dump(curl_version());"