summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2023-02-23 09:55:34 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2023-05-03 23:11:35 -0400
commit5ca09e56a79a365d20f480e8900c12d442ecec4a (patch)
tree17f4e914c87dd89935dea4159e16395df357bb30
parenteae1bbac182f9966ec652cce954f65c9046463a0 (diff)
downloadlighttpd-git-5ca09e56a79a365d20f480e8900c12d442ecec4a.tar.gz
[tests] _WIN32 skip time-sensitive tests during CI
-rwxr-xr-xtests/mod-fastcgi.t17
-rwxr-xr-xtests/mod-scgi.t17
2 files changed, 16 insertions, 18 deletions
diff --git a/tests/mod-fastcgi.t b/tests/mod-fastcgi.t
index c225bfb4..1e9134d9 100755
--- a/tests/mod-fastcgi.t
+++ b/tests/mod-fastcgi.t
@@ -192,23 +192,21 @@ EOF
# skip timing-sensitive test during CI testing, but run for user 'gps'
my $user = `id -un`;
chomp($user) if $user;
- if (($user || "") eq "gps") {
+ SKIP: {
+ skip "skip timing-sensitive restart test", 2
+ unless (($user || "") eq "gps");
+
$t->{REQUEST} = ( <<EOF
GET /index.fcgi?die-at-end HTTP/1.0
Host: www.example.org
EOF
);
- }
- else {
- $t->{REQUEST} = ( <<EOF
-GET /index.fcgi?crlf 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');
+ # (Windows is slooooow)
+ sleep 1 if $tf->{'win32native'};
+
# (might take lighttpd 1 sec to detect backend exit)
for (my $c = 2*30; $c && 0 == $tf->listening_on($ephemeral_port); --$c) {
select(undef, undef, undef, 0.05);
@@ -220,6 +218,7 @@ EOF
);
$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'test123' } ];
ok($tf->handle_http($t) == 0, 'regular response of after restart');
+ }
ok($tf->stop_proc == 0, "Stopping lighttpd");
diff --git a/tests/mod-scgi.t b/tests/mod-scgi.t
index 50b3a750..cde34164 100755
--- a/tests/mod-scgi.t
+++ b/tests/mod-scgi.t
@@ -74,23 +74,21 @@ EOF
# skip timing-sensitive test during CI testing, but run for user 'gps'
my $user = `id -un`;
chomp($user) if $user;
- if (($user || "") eq "gps") {
+ SKIP: {
+ skip "skip timing-sensitive restart test", 2
+ unless (($user || "") eq "gps");
+
$t->{REQUEST} = ( <<EOF
GET /index.scgi?die-at-end HTTP/1.0
Host: www.example.org
EOF
);
- }
- else {
- $t->{REQUEST} = ( <<EOF
-GET /index.scgi?crlf 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 scgi and wait for restart');
+ # (Windows is slooooow)
+ sleep 1 if $tf->{'win32native'};
+
# (might take lighttpd 1 sec to detect backend exit)
for (my $c = 2*30; $c && 0 == $tf->listening_on($ephemeral_port); --$c) {
select(undef, undef, undef, 0.05);
@@ -102,6 +100,7 @@ EOF
);
$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'test123' } ];
ok($tf->handle_http($t) == 0, 'regular response of after restart');
+ }
ok($tf->stop_proc == 0, "Stopping lighttpd");