diff options
Diffstat (limited to 'tests/mod-fastcgi.t')
-rwxr-xr-x | tests/mod-fastcgi.t | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/mod-fastcgi.t b/tests/mod-fastcgi.t index 8bf846be..f90ed852 100755 --- a/tests/mod-fastcgi.t +++ b/tests/mod-fastcgi.t @@ -19,6 +19,9 @@ SKIP: { unless ( -x $tf->{BASEDIR}."/tests/fcgi-responder" || -x $tf->{BASEDIR}."/tests/fcgi-responder.exe"); + my $ephemeral_port = LightyTest->get_ephemeral_tcp_port(); + $ENV{EPHEMERAL_PORT} = $ephemeral_port; + $tf->{CONFIGFILE} = 'fastcgi-responder.conf'; ok($tf->start_proc == 0, "Starting lighttpd with $tf->{CONFIGFILE}") or die(); @@ -196,7 +199,7 @@ EOF # (might take lighttpd 1 sec to detect backend exit) select(undef, undef, undef, .5); - for (my $c = 2*20; $c && 0 == $tf->listening_on(10000); --$c) { + for (my $c = 2*20; $c && 0 == $tf->listening_on($ephemeral_port); --$c) { select(undef, undef, undef, 0.05); } $t->{REQUEST} = ( <<EOF |