Mercurial > hg > nginx-tests
comparison 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 |
comparison
equal
deleted
inserted
replaced
212:a7cc4371f4ad | 213:4ac0807cc3cf |
---|---|
74 open STDERR, ">&", \*OLDERR; | 74 open STDERR, ">&", \*OLDERR; |
75 }; | 75 }; |
76 plan(skip_all => 'no proxy_cache_lock') if $@; | 76 plan(skip_all => 'no proxy_cache_lock') if $@; |
77 | 77 |
78 $t->plan(19); | 78 $t->plan(19); |
79 $t->waitforsocket('127.0.0.1:8081'); | |
79 | 80 |
80 ############################################################################### | 81 ############################################################################### |
81 | 82 |
82 # sequentional requests | 83 # sequentional requests |
83 | 84 |
197 | 198 |
198 $uri = $1 if /GET (.*) HTTP/; | 199 $uri = $1 if /GET (.*) HTTP/; |
199 last if /^\x0d?\x0a?$/; | 200 last if /^\x0d?\x0a?$/; |
200 } | 201 } |
201 | 202 |
203 next unless $uri; | |
204 | |
202 sleep(1); | 205 sleep(1); |
203 | 206 |
204 $num++; | 207 $num++; |
205 print $client <<"EOF"; | 208 print $client <<"EOF"; |
206 HTTP/1.1 200 OK | 209 HTTP/1.1 200 OK |