Mercurial > hg > nginx-tests
changeset 607:97e88eff1433
Tests: proxy cache lock tests adjusted similar to 28a8248740ca.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 16 Jun 2015 12:58:54 +0300 |
parents | 530a3152753b |
children | ef1c363dd648 |
files | proxy_cache_lock.t |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/proxy_cache_lock.t Mon Jun 15 19:59:59 2015 +0300 +++ b/proxy_cache_lock.t Tue Jun 16 12:58:54 2015 +0300 @@ -21,7 +21,7 @@ select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http proxy cache shmem/)->plan(18) +my $t = Test::Nginx->new()->has(qw/http proxy cache shmem/)->plan(17) ->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% @@ -113,10 +113,12 @@ $sockets[$i] = http_get('/nolock', start => 1); } -for my $i (1 .. 3) { - like(http_end($sockets[$i]), qr/request $i/, 'nolock ' . $i); -} +like(http_end($sockets[1]), qr/request 1/, 'nolock - first'); +$rest = http_end($sockets[2]); +$rest .= http_end($sockets[3]); + +like($rest, qr/request (2.*request 3|3.*request 2)/s, 'nolock - rest'); like(http_get('/nolock'), qr/request 3/, 'nolock - last cached'); ###############################################################################