Mercurial > hg > nginx-tests
comparison lib/Test/Nginx/SMTP.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 |
88 sub authok { | 89 sub authok { |
89 my $self = shift; | 90 my $self = shift; |
90 Test::More->builder->like($self->read(), qr/^235 /, @_); | 91 Test::More->builder->like($self->read(), qr/^235 /, @_); |
91 } | 92 } |
92 | 93 |
94 sub can_read { | |
95 my ($self, $timo) = @_; | |
96 IO::Select->new($self->{_socket})->can_read($timo || 3); | |
97 } | |
98 | |
93 ############################################################################### | 99 ############################################################################### |
94 | 100 |
95 sub smtp_test_daemon { | 101 sub smtp_test_daemon { |
96 my ($port) = @_; | 102 my ($port) = @_; |
97 | 103 |