comparison lib/Test/Nginx/IMAP.pm @ 1423:29d0961bc3f7

Tests: aligned generic read timeouts in stream and mail tests.
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 25 Dec 2018 13:56:49 +0300
parents 575d39cc0e35
children d0025a0dead7
comparison
equal deleted inserted replaced
1422:2d7fcd713b66 1423:29d0961bc3f7
58 sub read { 58 sub read {
59 my ($self) = @_; 59 my ($self) = @_;
60 my $socket = $self->{_socket}; 60 my $socket = $self->{_socket};
61 eval { 61 eval {
62 local $SIG{ALRM} = sub { die "timeout\n" }; 62 local $SIG{ALRM} = sub { die "timeout\n" };
63 alarm(3); 63 alarm(8);
64 while (<$socket>) { 64 while (<$socket>) {
65 log_in($_); 65 log_in($_);
66 # XXX 66 # XXX
67 next if m/^\d\d\d-/; 67 next if m/^\d\d\d-/;
68 last; 68 last;