changeset 576:239ade56c015

Tests: more proxy_cache_lock_age tests. Reflect that when an aged request completes, the response updates proxy cache.
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 14 May 2015 17:28:52 +0300
parents eea2b0158b51
children 90f9b128b218
files proxy_cache_lock_age.t
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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 {