Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

42 lines (33 sloc) 0.786 kb
# vim:set ft= ts=4 sw=4 et fdm=marker:
use lib 'lib';
use Test::Nginx::Socket;
#worker_connections(1014);
#master_on();
#workers(2);
#log_level('warn');
repeat_each(2);
#repeat_each(1);
plan tests => repeat_each() * (blocks() * 1);
if ($ENV{LD_PRELOAD} !~ /\bmockeagain\.so\b/) {
$ENV{LD_PRELOAD} = "mockeagain.so $ENV{LD_PRELOAD}";
}
$ENV{MOCKEAGAIN_WRITE_TIMEOUT_PATTERN} = 'hello, world';
#no_diff();
#no_long_string();
run_tests();
__DATA__
=== TEST 1: flush wait - timeout
--- config
send_timeout 100ms;
location /test {
content_by_lua '
ngx.say("hello, world")
ngx.flush(true)
ngx.say("hiya")
';
}
--- request
GET /test
--- ignore_response
--- error_log chop
client timed out (110: Connection timed out)
Jump to Line
Something went wrong with that request. Please try again.