Mercurial > hg > nginx-tests
diff proxy_cache_lock.t @ 233:1a5574d84917
Tests: tweak various timeouts and replace sleep() with select().
Hopefully this will result in less spurious test failures, in particular
on our Solaris VM.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 10 Sep 2012 20:18:05 +0400 |
parents | f9325406df0b |
children | 6a0d934950bc |
line wrap: on
line diff
--- a/proxy_cache_lock.t +++ b/proxy_cache_lock.t @@ -56,7 +56,7 @@ http { proxy_cache NAME; proxy_cache_lock on; - proxy_cache_lock_timeout 300ms; + proxy_cache_lock_timeout 200ms; } location /nolock { @@ -137,7 +137,7 @@ sub http_start { eval { local $SIG{ALRM} = sub { die "timeout\n" }; local $SIG{PIPE} = sub { die "sigpipe\n" }; - alarm(2); + alarm(3); $s = IO::Socket::INET->new( Proto => 'tcp', PeerAddr => '127.0.0.1:8080' @@ -161,7 +161,7 @@ sub http_end { eval { local $SIG{ALRM} = sub { die "timeout\n" }; local $SIG{PIPE} = sub { die "sigpipe\n" }; - alarm(2); + alarm(3); local $/; $reply = $s->getline(); log_in($reply); @@ -204,7 +204,7 @@ sub http_fake_daemon { next unless $uri; - sleep(1); + select(undef, undef, undef, 0.5); $num++; print $client <<"EOF";