comparison proxy_cache_lock_ssi.t @ 640:1d1eaf5ce064

Tests: adjusted proxy_cache_lock_ssi.t test timeouts. Timeouts were relaxed to avoid occasional failures.
author Sergey Kandaurov <pluknet@nginx.com>
date Mon, 03 Aug 2015 11:04:43 +0300
parents e36b267021e3
children e9064d691790
comparison
equal deleted inserted replaced
639:2b43ad56bce0 640:1d1eaf5ce064
48 proxy_cache NAME; 48 proxy_cache NAME;
49 49
50 proxy_cache_lock on; 50 proxy_cache_lock on;
51 proxy_cache_lock_timeout 100ms; 51 proxy_cache_lock_timeout 100ms;
52 52
53 proxy_read_timeout 2s; 53 proxy_read_timeout 3s;
54 54
55 add_header X-Msec $msec; 55 add_header X-Msec $msec;
56 } 56 }
57 57
58 location = /ssi.html { 58 location = /ssi.html {
95 # but this is suboptimal behaviour 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, '<=', 5, 'parallel execution after lock timeout');
101 101
102 ############################################################################### 102 ###############################################################################