# HG changeset patch # User Sergey Kandaurov # Date 1431613732 -10800 # Node ID 239ade56c01538b409dc6969ee482e6d36b55fae # Parent eea2b0158b513ce2de3c37f08a6b5eccae4e636e Tests: more proxy_cache_lock_age tests. Reflect that when an aged request completes, the response updates proxy cache. diff --git a/proxy_cache_lock_age.t b/proxy_cache_lock_age.t --- a/proxy_cache_lock_age.t +++ b/proxy_cache_lock_age.t @@ -17,14 +17,14 @@ use IO::Select; BEGIN { use FindBin; chdir($FindBin::Bin); } use lib 'lib'; -use Test::Nginx; +use Test::Nginx qw/ :DEFAULT http_end /; ############################################################################### select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http proxy cache shmem/)->plan(2) +my $t = Test::Nginx->new()->has(qw/http proxy cache shmem/)->plan(4) ->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% @@ -68,6 +68,9 @@ like(http_get('/'), qr/request 2/, 'requ http_get('/close'); +like(http_end($s), qr/request 1/, 'request aged'); +like(http_get('/'), qr/request 1/, 'request aged cached'); + ############################################################################### sub http_daemon {