Mercurial > hg > nginx-tests
comparison proxy_cache.t @ 749:d1da28e28d1d
Tests: adjusted proxy_cache.t timeouts.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Fri, 23 Oct 2015 16:03:40 +0300 |
parents | 94033cdc2f78 |
children | 03e6f4bd35fd |
comparison
equal
deleted
inserted
replaced
748:b818ea3a73de | 749:d1da28e28d1d |
---|---|
47 location / { | 47 location / { |
48 proxy_pass http://127.0.0.1:8081; | 48 proxy_pass http://127.0.0.1:8081; |
49 | 49 |
50 proxy_cache NAME; | 50 proxy_cache NAME; |
51 | 51 |
52 proxy_cache_valid 200 302 1s; | 52 proxy_cache_valid 200 302 2s; |
53 proxy_cache_valid 301 1d; | 53 proxy_cache_valid 301 1d; |
54 proxy_cache_valid any 1m; | 54 proxy_cache_valid any 1m; |
55 | 55 |
56 proxy_cache_min_uses 1; | 56 proxy_cache_min_uses 1; |
57 | 57 |
97 'cached multipart range'); | 97 'cached multipart range'); |
98 | 98 |
99 like(http_get('/empty.html'), qr/MISS/, 'empty get first'); | 99 like(http_get('/empty.html'), qr/MISS/, 'empty get first'); |
100 like(http_get('/empty.html'), qr/HIT/, 'empty get second'); | 100 like(http_get('/empty.html'), qr/HIT/, 'empty get second'); |
101 | 101 |
102 select(undef, undef, undef, 2.1); | 102 select(undef, undef, undef, 3.1); |
103 unlink $t->testdir() . '/t.html'; | 103 unlink $t->testdir() . '/t.html'; |
104 like(http_gzip_request('/t.html'), | 104 like(http_gzip_request('/t.html'), |
105 qr/HTTP.*STALE.*1c\x0d\x0a.{28}\x0d\x0a0\x0d\x0a\x0d\x0a\z/s, | 105 qr/HTTP.*STALE.*1c\x0d\x0a.{28}\x0d\x0a0\x0d\x0a\x0d\x0a\z/s, |
106 'non-empty get stale'); | 106 'non-empty get stale'); |
107 | 107 |