summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-03-17 12:28:51 +0100
committerJulian Andres Klode <jak@debian.org>2016-03-17 12:32:19 +0100
commitc030cc931ebfb7228801e5b63f3fc32852825da2 (patch)
treeaedb2bd9067add436dc20a33bc7aeb41aaef6276
parentdea8713142383aed6906f93e773329f8487d39b1 (diff)
test-acquire-same-file-multiple-times: Run failing test up to 10 times
This should make the test less flaky and hopefully fix the failure on Ubuntu's armhf CI nodes. Gbp-Dch: ignore
-rwxr-xr-xtest/integration/test-acquire-same-file-multiple-times16
1 files changed, 11 insertions, 5 deletions
diff --git a/test/integration/test-acquire-same-file-multiple-times b/test/integration/test-acquire-same-file-multiple-times
index fda7bf630..1edcf941c 100755
--- a/test/integration/test-acquire-same-file-multiple-times
+++ b/test/integration/test-acquire-same-file-multiple-times
@@ -58,11 +58,17 @@ 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
+ 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