File tree Expand file tree Collapse file tree 1 file changed +40
-1
lines changed Expand file tree Collapse file tree 1 file changed +40
-1
lines changed Original file line number Diff line number Diff line change 93
93
EOF
94
94
95
95
$t -> run_daemon(\&Test::Nginx::IMAP::imap_test_daemon);
96
- $t -> run()-> plan(23 );
96
+ $t -> run()-> plan(29 );
97
97
98
98
$t -> waitforsocket(' 127.0.0.1:' . port(8144));
99
99
@@ -231,4 +231,43 @@ $s->ok('backslash in literal');
231
231
232
232
}
233
233
234
+ # pipelining
235
+
236
+ $s = Test::Nginx::IMAP-> new();
237
+ $s -> read ();
238
+
239
+ $s -> send (' a01 INVALID COMMAND WITH ARGUMENTS' . CRLF
240
+ . ' a02 NOOP' );
241
+ $s -> check(qr / ^a01 BAD/ , ' pipelined invalid command' );
242
+
243
+ TODO: {
244
+ local $TODO = ' not yet' unless $t -> has_version(' 1.21.0' );
245
+
246
+ $s -> ok(' pipelined noop after invalid command' );
247
+
248
+ }
249
+
250
+ $s -> send (' a03 FOOBAR {10+}' . CRLF
251
+ . ' test test ' . CRLF
252
+ . ' a04 NOOP' );
253
+ $s -> check(qr / ^a03 BAD/ , ' invalid with non-sync literal' );
254
+ $s -> check(qr / ^(a04 |$ )/ , ' literal not command' );
255
+
256
+ TODO: {
257
+ todo_skip(' not yet' , 2) unless $t -> has_version(' 1.21.0' );
258
+
259
+ # skipped without a fix, since with level-triggered event methods
260
+ # this hogs cpu till the connection is closed by the backend server,
261
+ # and generates a lot of debug logs
262
+
263
+ $s = Test::Nginx::IMAP-> new();
264
+ $s -> read ();
265
+
266
+ $s -> send (
' a01 LOGIN [email protected] secret' . CRLF
267
+ . ' a02 LOGOUT' );
268
+ $s -> ok(' pipelined login' );
269
+ $s -> ok(' pipelined logout' );
270
+
271
+ }
272
+
234
273
# ##############################################################################
You can’t perform that action at this time.
0 commit comments