diff proxy_cache_lock.t @ 213:4ac0807cc3cf

Tests: eliminate race in proxy_cache_lock.t startup.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 23 Mar 2012 20:28:26 +0400
parents a7cc4371f4ad
children f9325406df0b
line wrap: on
line diff
--- a/proxy_cache_lock.t
+++ b/proxy_cache_lock.t
@@ -76,6 +76,7 @@ eval {
 plan(skip_all => 'no proxy_cache_lock') if $@;
 
 $t->plan(19);
+$t->waitforsocket('127.0.0.1:8081');
 
 ###############################################################################
 
@@ -199,6 +200,8 @@ sub http_fake_daemon {
 			last if /^\x0d?\x0a?$/;
 		}
 
+		next unless $uri;
+
 		sleep(1);
 
 		$num++;