Mercurial > hg > nginx-tests
comparison proxy_cache_use_stale.t @ 1137:129b9e4ca3b3
Tests: reduced race in proxy_cache_use_stale tests.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Mon, 27 Feb 2017 14:06:36 +0300 |
parents | d77c331affff |
children | d6acd17ca4e3 |
comparison
equal
deleted
inserted
replaced
1136:56d5efd16af6 | 1137:129b9e4ca3b3 |
---|---|
148 # UPDATING while s–w-r | 148 # UPDATING while s–w-r |
149 | 149 |
150 $t->write_file('t6.html', 'SEE-THAT'); | 150 $t->write_file('t6.html', 'SEE-THAT'); |
151 | 151 |
152 my $s = get('/t6.html', 'max-age=1, stale-while-revalidate=2', start => 1); | 152 my $s = get('/t6.html', 'max-age=1, stale-while-revalidate=2', start => 1); |
153 select undef, undef, undef, 0.2; | |
153 like(http_get('/t6.html'), qr/UPDATING.*SEE-THIS/s, 's-w-r - updating'); | 154 like(http_get('/t6.html'), qr/UPDATING.*SEE-THIS/s, 's-w-r - updating'); |
154 like(http_end($s), qr/STALE.*SEE-THIS/s, 's-w-r - updating stale'); | 155 like(http_end($s), qr/STALE.*SEE-THIS/s, 's-w-r - updating stale'); |
155 like(http_get('/t6.html'), qr/HIT.*SEE-THAT/s, 's-w-r - updating revalidated'); | 156 like(http_get('/t6.html'), qr/HIT.*SEE-THAT/s, 's-w-r - updating revalidated'); |
156 | 157 |
157 # stale-while-revalidate with proxy_cache_use_stale updating | 158 # stale-while-revalidate with proxy_cache_use_stale updating |