Mercurial > hg > nginx-tests
comparison proxy_cache_use_stale.t @ 1704:4b808861a318
Tests: proxy_cache_use_stale.t speedup.
Tests for not blocked stale responses are adjusted to have a lesser new
response size. It should be enough to delay sending a new response for
just a couple of seconds to catch the old bug fixed in 1.13.1. This
allows to speed up shutting down nginx that waits for those responses.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Sat, 19 Jun 2021 19:09:59 +0300 |
parents | 5ac6efbe5552 |
children | e3dd111410fe |
comparison
equal
deleted
inserted
replaced
1703:8b7ab9245916 | 1704:4b808861a318 |
---|---|
236 | 236 |
237 # stale response not blocked by background update. | 237 # stale response not blocked by background update. |
238 # before 1.13.1, if stale response was not sent in one pass, its remaining | 238 # before 1.13.1, if stale response was not sent in one pass, its remaining |
239 # part was blocked and not sent until background update has been finished | 239 # part was blocked and not sent until background update has been finished |
240 | 240 |
241 $t->write_file('t7.html', 'SEE-THAT' x 1024); | 241 $t->write_file('t7.html', 'SEE-THAT' x 256); |
242 | 242 |
243 my $r = read_all(get('/t7.html?lim=1', 'max-age=1', start => 1)); | 243 my $r = read_all(get('/t7.html?lim=1', 'max-age=1', start => 1)); |
244 like($r, qr/STALE.*^(SEE-THIS){1024}$/ms, 's-w-r - stale response not blocked'); | 244 like($r, qr/STALE.*^(SEE-THIS){1024}$/ms, 's-w-r - stale response not blocked'); |
245 | 245 |
246 $t->write_file('t9.html', 'SEE-THAT' x 1024); | 246 $t->write_file('t9.html', 'SEE-THAT' x 256); |
247 $t->write_file('ssi.html', 'xxx <!--#include virtual="/t9.html?lim=1" --> xxx'); | 247 $t->write_file('ssi.html', 'xxx <!--#include virtual="/t9.html?lim=1" --> xxx'); |
248 | 248 |
249 $r = read_all(http_get('/ssi.html', start => 1)); | 249 $r = read_all(http_get('/ssi.html', start => 1)); |
250 like($r, qr/^xxx (SEE-THIS){1024} xxx$/ms, 's-w-r - not blocked in subrequest'); | 250 like($r, qr/^xxx (SEE-THIS){1024} xxx$/ms, 's-w-r - not blocked in subrequest'); |
251 | 251 |