Mercurial > hg > nginx-tests
comparison proxy_cache.t @ 233:1a5574d84917
Tests: tweak various timeouts and replace sleep() with select().
Hopefully this will result in less spurious test failures, in particular
on our Solaris VM.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 10 Sep 2012 20:18:05 +0400 |
parents | ba992cfdc606 |
children | 6a0d934950bc |
comparison
equal
deleted
inserted
replaced
232:4c43b3a0117c | 233:1a5574d84917 |
---|---|
99 'cached multipart range'); | 99 'cached multipart range'); |
100 | 100 |
101 like(http_get('/empty.html'), qr/HTTP/, 'empty get first'); | 101 like(http_get('/empty.html'), qr/HTTP/, 'empty get first'); |
102 like(http_get('/empty.html'), qr/HTTP/, 'empty get second'); | 102 like(http_get('/empty.html'), qr/HTTP/, 'empty get second'); |
103 | 103 |
104 sleep(2); | 104 select(undef, undef, undef, 1.1); |
105 unlink $t->testdir() . '/t.html'; | 105 unlink $t->testdir() . '/t.html'; |
106 like(http_gzip_request('/t.html'), | 106 like(http_gzip_request('/t.html'), |
107 qr/HTTP.*1c\x0d\x0a.{28}\x0d\x0a0\x0d\x0a\x0d\x0a\z/s, | 107 qr/HTTP.*1c\x0d\x0a.{28}\x0d\x0a0\x0d\x0a\x0d\x0a\z/s, |
108 'non-empty get stale'); | 108 'non-empty get stale'); |
109 | 109 |