Mercurial > hg > nginx-tests
changeset 354:fb366c51eac6
Tests: reduce race in cache revalidate test.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 18 Nov 2013 21:37:19 +0400 |
parents | 19f58e91617a |
children | 14eba1ad0880 |
files | proxy_cache_revalidate.t |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/proxy_cache_revalidate.t +++ b/proxy_cache_revalidate.t @@ -93,8 +93,10 @@ select undef, undef, undef, 2.5; # (a 304 status code will appear in backend's logs), then cached again like(http_get('/t'), qr/X-Cache-Status: REVALIDATED.*SEE/ms, 'revalidated'); +like(http_get('/t'), qr/X-Cache-Status: HIT.*SEE/ms, 'request cached'); + +select undef, undef, undef, 0.1; like(read_file($t->testdir() . '/access.log'), qr/ 304 /, 'not modified'); -like(http_get('/t'), qr/X-Cache-Status: HIT.*SEE/ms, 'request cached'); # 2nd document is recreated with a new content