X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/3abb6a6a1e485b3bc899b64b0a1b7dc2db25a9c2..4ff5e237d5685be187a75c563b86e80ea3e7cc01:/test/integration/test-acquire-same-file-multiple-times?ds=sidebyside diff --git a/test/integration/test-acquire-same-file-multiple-times b/test/integration/test-acquire-same-file-multiple-times index fda7bf630..a6825b2c2 100755 --- a/test/integration/test-acquire-same-file-multiple-times +++ b/test/integration/test-acquire-same-file-multiple-times @@ -58,11 +58,18 @@ testrun 'httpdown' httpredirectdown() { msgtest 'Redirect leads' 'first URI to the second URI' - testsuccess --nomsg apthelper download-file "http://localhost:${APTHTTPPORT}/foo2" "./downloaded/foo1" '' \ - "http://localhost:${APTHTTPPORT}/foo" './downloaded/foo2' '' -o Debug::pkgAcquire::Worker=1 -o Debug::Acquire::http=1 - cp rootdir/tmp/testsuccess.output download.log - testsuccess cmp "$TESTDIR/framework" ./downloaded/foo1 - testsuccess cmp ./downloaded/foo1 ./downloaded/foo2 + for i in 1 2 3 4 5 6 7 8 9 10; do + rm -f ./downloaded/foo1 ./downloaded/foo2 + testsuccess --nomsg apthelper download-file "http://localhost:${APTHTTPPORT}/foo2" "./downloaded/foo1" '' \ + "http://localhost:${APTHTTPPORT}/foo" './downloaded/foo2' '' -o Debug::pkgAcquire::Worker=1 -o Debug::Acquire::http=1 + cp rootdir/tmp/testsuccess.output download.log + testsuccess cmp "$TESTDIR/framework" ./downloaded/foo1 + testsuccess cmp ./downloaded/foo1 ./downloaded/foo2 + + if grep -q '103%20Redirect' ./download.log; then + break + fi + done testequal '1' grep -c '200%20URI%20Start' ./download.log testequal '1' grep -c '103%20Redirect' ./download.log testequal '1' grep -c '201%20URI%20Done' ./download.log