# HG changeset patch # User Maxim Dounin # Date 1711772335 -10800 # Node ID 92d90cc5f5e53ccef2d550ffadf033b8005a4b7e # Parent 1867428f1673214f6e2bb647a2bba0ae3a77bcb7 Tests: test for long commands with SMTP pipelining. diff --git a/mail_smtp.t b/mail_smtp.t --- a/mail_smtp.t +++ b/mail_smtp.t @@ -98,7 +98,7 @@ http { EOF $t->run_daemon(\&Test::Nginx::SMTP::smtp_test_daemon); -$t->run()->plan(41); +$t->run()->plan(43); $t->waitforsocket('127.0.0.1:' . port(8026)); @@ -284,6 +284,28 @@ my $s = Test::Nginx::SMTP->new(); $s->ok('long pipelined rcpt to 4'); $s->ok('long pipelined rset'); +# Pipelining longer than smtp_client_buffer, with +# extra pipelined commands to be processed by nginx itself + +$s = Test::Nginx::SMTP->new(PeerAddr => '127.0.0.1:' . port(8027)); +$s->read(); +$s->send('EHLO example.com'); +$s->read(); + +$s->send('MAIL FROM: FOO=' . ('X' x 90) . CRLF + . 'RCPT TO:' . CRLF + . 'RSET'); + +$s->read(); + +TODO: { +local $TODO = 'not yet' unless $t->has_version('1.25.5'); + +$s->ok('pipelined long rcpt to'); +$s->ok('pipelined long rset'); + +} + # Connection must stay even if error returned to rcpt to command $s = Test::Nginx::SMTP->new();