Mercurial > hg > nginx-tests
comparison proxy_cache_lock_ssi.t @ 596:e36b267021e3
Tests: partially reverted 6cdfd177319b.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 28 May 2015 15:31:48 +0300 |
parents | 6cdfd177319b |
children | 1d1eaf5ce064 |
comparison
equal
deleted
inserted
replaced
595:6cdfd177319b | 596:e36b267021e3 |
---|---|
90 # main request -> subrequest /active (waiting for a backend), | 90 # main request -> subrequest /active (waiting for a backend), |
91 # -> subrequest /locked (locked by another request) | 91 # -> subrequest /locked (locked by another request) |
92 | 92 |
93 # this doesn't result in an infinite timeout as second subrequest | 93 # this doesn't result in an infinite timeout as second subrequest |
94 # is woken up by the postpone filter once first subrequest completes, | 94 # is woken up by the postpone filter once first subrequest completes, |
95 # but this is suboptimal behavior | 95 # but this is suboptimal behaviour |
96 | 96 |
97 my $s = http_get('/locked', start => 1); | 97 my $s = http_get('/locked', start => 1); |
98 like(http_get('/ssi.html'), qr/end/, 'cache lock ssi'); | 98 like(http_get('/ssi.html'), qr/end/, 'cache lock ssi'); |
99 my ($start) = http_end($s) =~ /X-Msec: (\d+)/; | 99 my ($start) = http_end($s) =~ /X-Msec: (\d+)/; |
100 cmp_ok(time() - $start, '<=', 3, 'parallel execution after lock timeout'); | 100 cmp_ok(time() - $start, '<=', 3, 'parallel execution after lock timeout'); |