Mercurial > hg > nginx-tests
comparison stub_status.t @ 600:3832869ba854
Tests: cleanup stub_status tests.
author | Andrey Zelenkov <zelenkov@nginx.com> |
---|---|
date | Tue, 02 Jun 2015 12:44:47 +0300 |
parents | 868ff7169ec8 |
children | e9064d691790 |
comparison
equal
deleted
inserted
replaced
599:868ff7169ec8 | 600:3832869ba854 |
---|---|
71 is($status{'writing'}, 1, 'first response'); | 71 is($status{'writing'}, 1, 'first response'); |
72 is($status{'reading'}, 0, 'not reading'); | 72 is($status{'reading'}, 0, 'not reading'); |
73 | 73 |
74 # pipelined requests | 74 # pipelined requests |
75 | 75 |
76 my $s = http(<<EOF); | 76 http(<<EOF); |
77 GET / HTTP/1.1 | 77 GET / HTTP/1.1 |
78 Host: localhost | 78 Host: localhost |
79 | 79 |
80 GET / HTTP/1.1 | 80 GET / HTTP/1.1 |
81 Host: localhost | 81 Host: localhost |
87 is($status{'requests'}, 5, 'requests increased by 2'); | 87 is($status{'requests'}, 5, 'requests increased by 2'); |
88 is($status{'accepts'}, 4, 'accepts increased by 1'); | 88 is($status{'accepts'}, 4, 'accepts increased by 1'); |
89 | 89 |
90 # states | 90 # states |
91 | 91 |
92 $s = http('', start => 1); | 92 my $s = http('', start => 1); |
93 | 93 |
94 %status = status('/stub'); | 94 %status = status('/stub'); |
95 is($status{'active'}, 2, 'active'); | 95 is($status{'active'}, 2, 'active'); |
96 is($status{'waiting'}, 1, 'waiting state'); | 96 is($status{'waiting'}, 1, 'waiting state'); |
97 is($status{'reading'}, 0, 'waiting state - not reading'); | 97 is($status{'reading'}, 0, 'waiting state - not reading'); |