# HG changeset patch # User Andrey Zelenkov # Date 1433236274 -10800 # Node ID 868ff7169ec8b11680fa9e3be4b6a4222982d371 # Parent 153969b5378093b133ed17ae235c14587b518173 Tests: fixed stub_status tests, notably on freebsd. Added delay for state tests to keep correct request order. Made sure to process pipelined requests. diff --git a/stub_status.t b/stub_status.t --- a/stub_status.t +++ b/stub_status.t @@ -73,12 +73,13 @@ is($status{'reading'}, 0, 'not reading') # pipelined requests -my $s = http(< 1); +my $s = http(<close(); - # states $s = http('', start => 1); @@ -98,7 +97,7 @@ is($status{'waiting'}, 1, 'waiting state is($status{'reading'}, 0, 'waiting state - not reading'); is($status{'writing'}, 1, 'waiting state - not writing'); -http(< 1, socket => $s); +http(< 1, socket => $s, sleep => 0.2); GET /rate HTTP/1.0 EOF @@ -107,7 +106,7 @@ is($status{'waiting'}, 0, 'reading state is($status{'reading'}, 1, 'reading state'); is($status{'writing'}, 1, 'reading state - not writing'); -http(< 1, socket => $s); +http(< 1, socket => $s, sleep => 0.2); Host: localhost EOF