diff options
author | Nathan Gass | 2023-11-20 18:21:37 +0100 |
---|---|---|
committer | Nathan Gass | 2023-11-20 18:21:37 +0100 |
commit | d72f3476b4cd7d64280fbcdb73c8a15e99f66aa5 (patch) | |
tree | b37322a9f9dc675358252edd321c1a8b94113e56 /test/it_url_server.php | |
parent | a059593f4301d8a28b1e019908bfd46530ff0747 (diff) | |
download | itools-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.php | 5 |
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( |