Mercurial > hg > nginx-tests
changeset 163:450206ed1fd2
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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 01 Aug 2011 21:23:49 +0400 |
parents | 465a711ffa19 |
children | f602276b9bb9 |
files | lib/Test/Nginx.pm |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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; }