Mercurial > hg > nginx-tests
diff lib/Test/Nginx/POP3.pm @ 1244:575d39cc0e35
Tests: worker_shutdown_timeout within the mail module.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Mon, 20 Nov 2017 17:55:22 +0300 |
parents | 1edb092149e2 |
children | 29d0961bc3f7 |
line wrap: on
line diff
--- a/lib/Test/Nginx/POP3.pm +++ b/lib/Test/Nginx/POP3.pm @@ -10,6 +10,7 @@ use warnings; use strict; use Test::More qw//; +use IO::Select; use IO::Socket; use Socket qw/ CRLF /; @@ -86,6 +87,11 @@ sub ok { Test::More->builder->like($self->read(), qr/^\+OK/, @_); } +sub can_read { + my ($self, $timo) = @_; + IO::Select->new($self->{_socket})->can_read($timo || 3); +} + ############################################################################### sub pop3_test_daemon {