Mercurial > hg > nginx-tests
changeset 37:6cf314ec8f7b
Tests: while starting nginx monitor pidfile instead of sleeping.
This reduces test execution time significantly.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Fri, 24 Oct 2008 14:42:21 +0400 |
parents | bd1a5e92d0c0 |
children | 9a7158a8609a |
files | lib/Test/Nginx.pm |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/Test/Nginx.pm Wed Oct 22 04:00:13 2008 +0400 +++ b/lib/Test/Nginx.pm Fri Oct 24 14:42:21 2008 +0400 @@ -97,7 +97,10 @@ # wait for nginx to start - sleep 1; + for (1 .. 30) { + select undef, undef, undef, 0.05; + last if -e "$self->{_testdir}/nginx.pid"; + } die "Can't start nginx" unless -e "$self->{_testdir}/nginx.pid";