Tests: aligned various generic read timeouts to http_end(). It was observed that previous timeout values could not be enough when making mass-building, in particular, when running with modsecurity.
diff --git a/h2_fastcgi_request_buffering.t b/h2_fastcgi_request_buffering.t index 7f0ac39..00b95a8 100644 --- a/h2_fastcgi_request_buffering.t +++ b/h2_fastcgi_request_buffering.t
@@ -265,7 +265,7 @@ my ($s, $timo) = @_; my $buf = ''; - if (IO::Select->new($s)->can_read($timo || 5)) { + if (IO::Select->new($s)->can_read($timo || 8)) { $s->sysread($buf, 16384) or return; log2i($buf); }
diff --git a/h2_proxy_request_buffering.t b/h2_proxy_request_buffering.t index f72cc24..75a22b1 100644 --- a/h2_proxy_request_buffering.t +++ b/h2_proxy_request_buffering.t
@@ -265,7 +265,7 @@ my ($s, $timo) = @_; my $buf = ''; - if (IO::Select->new($s)->can_read($timo || 5)) { + if (IO::Select->new($s)->can_read($timo || 8)) { $s->sysread($buf, 16384) or return; log2i($buf); }
diff --git a/h2_proxy_request_buffering_ssl.t b/h2_proxy_request_buffering_ssl.t index 76a2383..5f15175 100644 --- a/h2_proxy_request_buffering_ssl.t +++ b/h2_proxy_request_buffering_ssl.t
@@ -270,7 +270,7 @@ my ($s, $timo) = @_; my $buf = ''; - if (IO::Select->new($s)->can_read($timo || 5)) { + if (IO::Select->new($s)->can_read($timo || 8)) { $s->sysread($buf, 16384) or return; log2i($buf); }
diff --git a/h2_ssl_verify_client.t b/h2_ssl_verify_client.t index f65c267..e4af45d 100644 --- a/h2_ssl_verify_client.t +++ b/h2_ssl_verify_client.t
@@ -114,7 +114,7 @@ eval { local $SIG{ALRM} = sub { die "timeout\n" }; local $SIG{PIPE} = sub { die "sigpipe\n" }; - alarm(5); + alarm(8); $s = IO::Socket::SSL->new( Proto => 'tcp', PeerAddr => '127.0.0.1',
diff --git a/lib/Test/Nginx/HTTP2.pm b/lib/Test/Nginx/HTTP2.pm index d35937c..2a7f0a6 100644 --- a/lib/Test/Nginx/HTTP2.pm +++ b/lib/Test/Nginx/HTTP2.pm
@@ -465,7 +465,7 @@ sub raw_read { my ($s, $buf, $len, $timo) = @_; - $timo = 5 unless $timo; + $timo = 8 unless $timo; my $got = ''; while (length($buf) < $len && IO::Select->new($s)->can_read($timo)) { @@ -501,7 +501,7 @@ eval { local $SIG{ALRM} = sub { die "timeout\n" }; local $SIG{PIPE} = sub { die "sigpipe\n" }; - alarm(5); + alarm(8); $s = IO::Socket::INET->new( Proto => 'tcp', PeerAddr => "127.0.0.1:$port",
diff --git a/ssl.t b/ssl.t index 3565cad..dc128b1 100644 --- a/ssl.t +++ b/ssl.t
@@ -300,7 +300,7 @@ eval { local $SIG{ALRM} = sub { die "timeout\n" }; local $SIG{PIPE} = sub { die "sigpipe\n" }; - alarm(5); + alarm(8); $s = IO::Socket::SSL->new( Proto => 'tcp', PeerAddr => '127.0.0.1',
diff --git a/ssl_certificate_chain.t b/ssl_certificate_chain.t index 2934e34..d2aa542 100644 --- a/ssl_certificate_chain.t +++ b/ssl_certificate_chain.t
@@ -150,7 +150,7 @@ eval { local $SIG{ALRM} = sub { die "timeout\n" }; local $SIG{PIPE} = sub { die "sigpipe\n" }; - alarm(5); + alarm(8); $s = IO::Socket::SSL->new( Proto => 'tcp', PeerAddr => '127.0.0.1',
diff --git a/ssl_certificates.t b/ssl_certificates.t index dcebaaf..ab58ca9 100644 --- a/ssl_certificates.t +++ b/ssl_certificates.t
@@ -121,7 +121,7 @@ eval { local $SIG{ALRM} = sub { die "timeout\n" }; local $SIG{PIPE} = sub { die "sigpipe\n" }; - alarm(5); + alarm(8); $s = IO::Socket::INET->new('127.0.0.1:' . port(8080)); alarm(0); };
diff --git a/ssl_client_escaped_cert.t b/ssl_client_escaped_cert.t index 259c5be..d2a70d9 100644 --- a/ssl_client_escaped_cert.t +++ b/ssl_client_escaped_cert.t
@@ -101,7 +101,7 @@ eval { local $SIG{ALRM} = sub { die "timeout\n" }; local $SIG{PIPE} = sub { die "sigpipe\n" }; - alarm(5); + alarm(8); $s = IO::Socket::SSL->new( Proto => 'tcp', PeerAddr => '127.0.0.1',
diff --git a/ssl_crl.t b/ssl_crl.t index ba4261d..25110ea 100644 --- a/ssl_crl.t +++ b/ssl_crl.t
@@ -178,7 +178,7 @@ eval { local $SIG{ALRM} = sub { die "timeout\n" }; local $SIG{PIPE} = sub { die "sigpipe\n" }; - alarm(5); + alarm(8); $s = IO::Socket::SSL->new( Proto => 'tcp', PeerAddr => '127.0.0.1',
diff --git a/ssl_password_file.t b/ssl_password_file.t index e1bcca3..f59d35a 100644 --- a/ssl_password_file.t +++ b/ssl_password_file.t
@@ -147,7 +147,7 @@ eval { local $SIG{ALRM} = sub { die "timeout\n" }; local $SIG{PIPE} = sub { die "sigpipe\n" }; - alarm(5); + alarm(8); $s = IO::Socket::SSL->new( Proto => 'tcp', PeerAddr => '127.0.0.1:' . port(8081),
diff --git a/ssl_proxy_protocol.t b/ssl_proxy_protocol.t index 8615921..6ef3a8a 100644 --- a/ssl_proxy_protocol.t +++ b/ssl_proxy_protocol.t
@@ -156,7 +156,7 @@ eval { local $SIG{ALRM} = sub { die "timeout\n" }; local $SIG{PIPE} = sub { die "sigpipe\n" }; - alarm(5); + alarm(8); IO::Socket::SSL->start_SSL($s, SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE(), SSL_error_trap => sub { die $_[1] }
diff --git a/ssl_sni.t b/ssl_sni.t index 26fb124..13b2c71 100644 --- a/ssl_sni.t +++ b/ssl_sni.t
@@ -133,7 +133,7 @@ eval { local $SIG{ALRM} = sub { die "timeout\n" }; local $SIG{PIPE} = sub { die "sigpipe\n" }; - alarm(5); + alarm(8); $s = IO::Socket::SSL->new( Proto => 'tcp', PeerAddr => '127.0.0.1:' . port(8080),
diff --git a/ssl_sni_reneg.t b/ssl_sni_reneg.t index 7687b66..75878d7 100644 --- a/ssl_sni_reneg.t +++ b/ssl_sni_reneg.t
@@ -171,7 +171,7 @@ eval { local $SIG{ALRM} = sub { die "timeout\n" }; local $SIG{PIPE} = sub { die "sigpipe\n" }; - alarm(5); + alarm(8); socket($s, &AF_INET, &SOCK_STREAM, 0) or die "socket: $!"; connect($s, $dest_serv_params) or die "connect: $!"; alarm(0);
diff --git a/ssl_sni_sessions.t b/ssl_sni_sessions.t index 8b04c83..a6acab1 100644 --- a/ssl_sni_sessions.t +++ b/ssl_sni_sessions.t
@@ -177,7 +177,7 @@ eval { local $SIG{ALRM} = sub { die "timeout\n" }; local $SIG{PIPE} = sub { die "sigpipe\n" }; - alarm(5); + alarm(8); $s = IO::Socket::SSL->new( Proto => 'tcp', PeerAddr => '127.0.0.1',
diff --git a/ssl_stapling.t b/ssl_stapling.t index 251689b..fd9e701 100644 --- a/ssl_stapling.t +++ b/ssl_stapling.t
@@ -294,7 +294,7 @@ eval { local $SIG{ALRM} = sub { die "timeout\n" }; local $SIG{PIPE} = sub { die "sigpipe\n" }; - alarm(5); + alarm(8); $s = IO::Socket::INET->new('127.0.0.1:' . port($port)); alarm(0); }; @@ -335,7 +335,7 @@ eval { local $SIG{ALRM} = sub { die "timeout\n" }; local $SIG{PIPE} = sub { die "sigpipe\n" }; - alarm(5); + alarm(8); $s = IO::Socket::INET->new('127.0.0.1:' . port(8443)); alarm(0); };
diff --git a/ssl_verify_depth.t b/ssl_verify_depth.t index 452cccd..0912a54 100644 --- a/ssl_verify_depth.t +++ b/ssl_verify_depth.t
@@ -142,7 +142,7 @@ eval { local $SIG{ALRM} = sub { die "timeout\n" }; local $SIG{PIPE} = sub { die "sigpipe\n" }; - alarm(5); + alarm(8); $s = IO::Socket::SSL->new( Proto => 'tcp', PeerAddr => '127.0.0.1',
diff --git a/stream_ssl_preread.t b/stream_ssl_preread.t index 54085fa..e555e05 100644 --- a/stream_ssl_preread.t +++ b/stream_ssl_preread.t
@@ -223,7 +223,7 @@ eval { local $SIG{ALRM} = sub { die "timeout\n" }; local $SIG{PIPE} = sub { die "sigpipe\n" }; - alarm(5); + alarm(8); IO::Socket::SSL->start_SSL($s->{_socket}, SSL_hostname => $host, SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE(),
diff --git a/stream_ssl_preread_alpn.t b/stream_ssl_preread_alpn.t index ec72b60..70cdf25 100644 --- a/stream_ssl_preread_alpn.t +++ b/stream_ssl_preread_alpn.t
@@ -127,7 +127,7 @@ eval { local $SIG{ALRM} = sub { die "timeout\n" }; local $SIG{PIPE} = sub { die "sigpipe\n" }; - alarm(5); + alarm(8); IO::Socket::SSL->start_SSL($s->{_socket}, SSL_alpn_protocols => [ @alpn ], SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE(),
diff --git a/stream_ssl_realip.t b/stream_ssl_realip.t index 42f10ca..79cb65d 100644 --- a/stream_ssl_realip.t +++ b/stream_ssl_realip.t
@@ -134,7 +134,7 @@ eval { local $SIG{ALRM} = sub { die "timeout\n" }; local $SIG{PIPE} = sub { die "sigpipe\n" }; - alarm(5); + alarm(8); IO::Socket::SSL->start_SSL($s->{_socket}, SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE(), SSL_error_trap => sub { die $_[1] }