From 5ca09e56a79a365d20f480e8900c12d442ecec4a Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Thu, 23 Feb 2023 09:55:34 -0500 Subject: [tests] _WIN32 skip time-sensitive tests during CI --- tests/mod-fastcgi.t | 17 ++++++++--------- tests/mod-scgi.t | 17 ++++++++--------- 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} = ( <{REQUEST} = ( <{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} = ( <{REQUEST} = ( <{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"); -- cgit v1.2.1