# HG changeset patch # User Sergey Kandaurov # Date 1443126851 -10800 # Node ID 94033cdc2f78f5dbeabc4bdde7c1e90c8f0c4940 # Parent 649af6069976f6e9ddb6685890b8742e91809b7b Tests: adjusted proxy_cache.t timeout to get stale cached response. Assert this is actually so by testing $upstream_cache_status value. diff --git a/proxy_cache.t b/proxy_cache.t --- a/proxy_cache.t +++ b/proxy_cache.t @@ -99,15 +99,15 @@ like(http_get_range('/t.html', 'Range: b 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'); ###############################################################################