comparison proxy_store.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 5ac875a3088e
comparison
equal deleted inserted replaced
232:4c43b3a0117c 233:1a5574d84917
81 } 81 }
82 82
83 ok(scalar @{[ glob $t->testdir() . '/proxy_temp/*' ]} == 0, 'no temp files'); 83 ok(scalar @{[ glob $t->testdir() . '/proxy_temp/*' ]} == 0, 'no temp files');
84 84
85 http_get('/store-index-big.html', aborted => 1, sleep => 0.1); 85 http_get('/store-index-big.html', aborted => 1, sleep => 0.1);
86 sleep(1); 86 select(undef, undef, undef, 0.5);
87 87
88 ok(scalar @{[ glob $t->testdir() . '/proxy_temp/*' ]} == 0, 88 ok(scalar @{[ glob $t->testdir() . '/proxy_temp/*' ]} == 0,
89 'no temp files after aborted request'); 89 'no temp files after aborted request');
90 90
91 http_get('/ssi.html', aborted => 1, sleep => 0.1); 91 http_get('/ssi.html', aborted => 1, sleep => 0.1);
92 sleep(1); 92 select(undef, undef, undef, 0.5);
93 93
94 ok(scalar @{[ glob $t->testdir() . '/proxy_temp/*' ]} == 0, 94 ok(scalar @{[ glob $t->testdir() . '/proxy_temp/*' ]} == 0,
95 'no temp files after aborted ssi'); 95 'no temp files after aborted ssi');
96 96
97 ############################################################################### 97 ###############################################################################