# HG changeset patch # User Maxim Dounin # Date 1312219429 -14400 # Node ID 450206ed1fd2a76ad115ae22c422596281756ff7 # Parent 465a711ffa1998511290049117359568e9c1b20b Tests: move logging out of alarm. Logging large amounts of data may be terminated by alarm() which isn't really good (and likely to corrupt TAP output). Problem seen on limit_req.t test with logging enabled. diff --git a/lib/Test/Nginx.pm b/lib/Test/Nginx.pm --- a/lib/Test/Nginx.pm +++ b/lib/Test/Nginx.pm @@ -366,13 +366,14 @@ sub http($;%) { select undef, undef, undef, $extra{sleep} if $extra{sleep}; return '' if $extra{aborted}; $reply = $s->getline(); - log_in($reply); alarm(0); }; alarm(0); if ($@) { log_in("died: $@"); return undef; + } else { + log_in($reply); } return $reply; }