comparison lib/Test/Nginx/IMAP.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
comparison
equal deleted inserted replaced
1243:6ea73d9f42e0 1244:575d39cc0e35
8 8
9 use warnings; 9 use warnings;
10 use strict; 10 use strict;
11 11
12 use Test::More qw//; 12 use Test::More qw//;
13 use IO::Select;
13 use IO::Socket; 14 use IO::Socket;
14 use Socket qw/ CRLF /; 15 use Socket qw/ CRLF /;
15 16
16 use Test::Nginx; 17 use Test::Nginx;
17 18
84 sub ok { 85 sub ok {
85 my $self = shift; 86 my $self = shift;
86 Test::More->builder->like($self->read(), qr/^\S+ OK/, @_); 87 Test::More->builder->like($self->read(), qr/^\S+ OK/, @_);
87 } 88 }
88 89
90 sub can_read {
91 my ($self, $timo) = @_;
92 IO::Select->new($self->{_socket})->can_read($timo || 3);
93 }
94
89 ############################################################################### 95 ###############################################################################
90 96
91 sub imap_test_daemon { 97 sub imap_test_daemon {
92 my ($port) = @_; 98 my ($port) = @_;
93 99