Mercurial > hg > nginx-tests
changeset 713:94033cdc2f78
Tests: adjusted proxy_cache.t timeout to get stale cached response.
Assert this is actually so by testing $upstream_cache_status value.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Thu, 24 Sep 2015 23:34:11 +0300 |
parents | 649af6069976 |
children | ccc9f389e1f8 |
files | proxy_cache.t |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/proxy_cache.t Thu Sep 24 16:05:19 2015 +0300 +++ b/proxy_cache.t Thu Sep 24 23:34:11 2015 +0300 @@ -99,15 +99,15 @@ like(http_get('/empty.html'), qr/MISS/, 'empty get first'); like(http_get('/empty.html'), qr/HIT/, 'empty get second'); -select(undef, undef, undef, 1.1); +select(undef, undef, undef, 2.1); unlink $t->testdir() . '/t.html'; like(http_gzip_request('/t.html'), - qr/HTTP.*1c\x0d\x0a.{28}\x0d\x0a0\x0d\x0a\x0d\x0a\z/s, + qr/HTTP.*STALE.*1c\x0d\x0a.{28}\x0d\x0a0\x0d\x0a\x0d\x0a\z/s, 'non-empty get stale'); unlink $t->testdir() . '/empty.html'; like(http_gzip_request('/empty.html'), - qr/HTTP.*14\x0d\x0a.{20}\x0d\x0a0\x0d\x0a\x0d\x0a\z/s, + qr/HTTP.*STALE.*14\x0d\x0a.{20}\x0d\x0a0\x0d\x0a\x0d\x0a\z/s, 'empty get stale'); ###############################################################################