summaryrefslogtreecommitdiff
path: root/test/it_url_server.php
diff options
context:
space:
mode:
authorNathan Gass2023-11-20 18:21:37 +0100
committerNathan Gass2023-11-20 18:21:37 +0100
commitd72f3476b4cd7d64280fbcdb73c8a15e99f66aa5 (patch)
treeb37322a9f9dc675358252edd321c1a8b94113e56 /test/it_url_server.php
parenta059593f4301d8a28b1e019908bfd46530ff0747 (diff)
downloaditools-d72f3476b4cd7d64280fbcdb73c8a15e99f66aa5.tar.gz
itools-d72f3476b4cd7d64280fbcdb73c8a15e99f66aa5.tar.bz2
itools-d72f3476b4cd7d64280fbcdb73c8a15e99f66aa5.zip
use random port to avoid races
Diffstat (limited to 'test/it_url_server.php')
-rw-r--r--test/it_url_server.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/it_url_server.php b/test/it_url_server.php
index b113be1..c832ee5 100644
--- a/test/it_url_server.php
+++ b/test/it_url_server.php
@@ -1,7 +1,8 @@
<?php
+$host = 'localhost:' . rand(8000,8060);
$server = proc_open(
- 'php -S localhost:8000 -q ' . dirname($_SERVER['PHP_SELF']) . '/it_url.testserver.php',
- array(0 => fopen('/dev/null', 'r'), 1 => fopen('/dev/null', 'w'), 2 => array('pipe', 'w')),
+ "php -S $host -q " . dirname($_SERVER['PHP_SELF']) . '/it_url.testserver.php',
+ array(0 => it::fopen('/dev/null', 'r'), 1 => it::fopen('/dev/null', 'w'), 2 => array('pipe', 'w')),
$pipes
);
register_shutdown_function(