Mercurial > hg > nginx-tests
changeset 599:868ff7169ec8
Tests: fixed stub_status tests, notably on freebsd.
Added delay for state tests to keep correct request order.
Made sure to process pipelined requests.
author | Andrey Zelenkov <zelenkov@nginx.com> |
---|---|
date | Tue, 02 Jun 2015 12:11:14 +0300 |
parents | 153969b53780 |
children | 3832869ba854 |
files | stub_status.t |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/stub_status.t Mon Jun 01 21:15:32 2015 +0300 +++ b/stub_status.t Tue Jun 02 12:11:14 2015 +0300 @@ -73,12 +73,13 @@ # pipelined requests -my $s = http(<<EOF, start => 1); +my $s = http(<<EOF); GET / HTTP/1.1 Host: localhost GET / HTTP/1.1 Host: localhost +Connection: close EOF @@ -86,8 +87,6 @@ is($status{'requests'}, 5, 'requests increased by 2'); is($status{'accepts'}, 4, 'accepts increased by 1'); -$s->close(); - # states $s = http('', start => 1); @@ -98,7 +97,7 @@ is($status{'reading'}, 0, 'waiting state - not reading'); is($status{'writing'}, 1, 'waiting state - not writing'); -http(<<EOF, start => 1, socket => $s); +http(<<EOF, start => 1, socket => $s, sleep => 0.2); GET /rate HTTP/1.0 EOF @@ -107,7 +106,7 @@ is($status{'reading'}, 1, 'reading state'); is($status{'writing'}, 1, 'reading state - not writing'); -http(<<EOF, start => 1, socket => $s); +http(<<EOF, start => 1, socket => $s, sleep => 0.2); Host: localhost EOF