summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2017-01-10 06:34:23 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2017-01-10 07:54:47 -0500
commit64df38aad8443184ecf8b1a845aa2466b8a4ec43 (patch)
treead94e7638e02ef7b477ea03bd7ee956680fd5fc9 /tests
parent987a76ff586025c78746cc21cac2e4971069eafc (diff)
downloadlighttpd1.4-64df38aad8443184ecf8b1a845aa2466b8a4ec43.tar.gz
lighttpd1.4-64df38aad8443184ecf8b1a845aa2466b8a4ec43.zip
[mod_fastcgi] detect child exit, restart proactively
(instead of detecting upon a subsequent HTTP request) (for backends spawned by mod_fastcgi)
Diffstat (limited to 'tests')
-rw-r--r--tests/fcgi-responder.c2
-rwxr-xr-xtests/mod-fastcgi.t14
2 files changed, 3 insertions, 13 deletions
diff --git a/tests/fcgi-responder.c b/tests/fcgi-responder.c
index 8a86a73d..978d7348 100644
--- a/tests/fcgi-responder.c
+++ b/tests/fcgi-responder.c
@@ -11,7 +11,7 @@
#include <string.h>
int main (void) {
- int num_requests = 2;
+ int num_requests = 1;
while (num_requests > 0 &&
FCGI_Accept() >= 0) {
diff --git a/tests/mod-fastcgi.t b/tests/mod-fastcgi.t
index 31f1b92c..f5daaa9b 100755
--- a/tests/mod-fastcgi.t
+++ b/tests/mod-fastcgi.t
@@ -7,7 +7,7 @@ BEGIN {
}
use strict;
-use Test::More tests => 60;
+use Test::More tests => 59;
use LightyTest;
my $tf = LightyTest->new();
@@ -409,17 +409,7 @@ EOF
$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'test123' } ];
ok($tf->handle_http($t) == 0, 'killing fastcgi and wait for restart');
- select(undef, undef, undef, .2);
- $t->{REQUEST} = ( <<EOF
-GET /index.fcgi?die-at-end HTTP/1.0
-Host: www.example.org
-EOF
- );
- $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'test123' } ];
- ok($tf->handle_http($t) == 0, 'killing fastcgi and wait for restart');
-
-
- select(undef, undef, undef, .2);
+ select(undef, undef, undef, .1) while (!$tf->listening_on(10000));
$t->{REQUEST} = ( <<EOF
GET /index.fcgi?crlf HTTP/1.0
Host: www.example.org