comparison lib/Test/Nginx/HTTP2.pm @ 1051:4a915c4489cc

Tests: increased default value for read timeout in HTTP/2 tests. This is supposed to improve the tests stability on slow or unresponsive hosts without negatively impacting execution time.
author Sergey Kandaurov <pluknet@nginx.com>
date Fri, 07 Oct 2016 12:55:27 +0300
parents 1edb092149e2
children eedb96f717ff
comparison
equal deleted inserted replaced
1050:d56dfebf1aa0 1051:4a915c4489cc
446 unpack 'N', pack 'xc3', unpack 'c3', $_[0]; 446 unpack 'N', pack 'xc3', unpack 'c3', $_[0];
447 } 447 }
448 448
449 sub raw_read { 449 sub raw_read {
450 my ($s, $buf, $len, $timo) = @_; 450 my ($s, $buf, $len, $timo) = @_;
451 $timo = 3 unless $timo; 451 $timo = 5 unless $timo;
452 my $got = ''; 452 my $got = '';
453 453
454 while (length($buf) < $len && IO::Select->new($s)->can_read($timo)) { 454 while (length($buf) < $len && IO::Select->new($s)->can_read($timo)) {
455 $s->sysread($got, 16384) or last; 455 $s->sysread($got, 16384) or last;
456 log_in($got); 456 log_in($got);