summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2018-12-03 09:16:20 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2018-12-03 17:21:39 +0100
commitf35601e5d2b9fe8b99c6178cb9b160f1a42f432f (patch)
treec54da826c2541f166d25c2c394d44a6cbac485d8 /test
parentf313e09d167cc7a83846ac9d4d5d72ba10cc2638 (diff)
test-pdiff-usage: make transaction failure test case more robust
Try 10 times in a row
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-pdiff-usage8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/integration/test-pdiff-usage b/test/integration/test-pdiff-usage
index 7cda2ee45..c5726dd08 100755
--- a/test/integration/test-pdiff-usage
+++ b/test/integration/test-pdiff-usage
@@ -251,7 +251,13 @@ SHA256-Download:
cp Packages-future aptarchive/Packages
rm -f rootdir/var/lib/apt/lists/*_Contents-*
webserverconfig 'aptwebserver::overwrite::.*Contents-.*::filename' '/hacked-i386.gz'
- testfailure apt update "$@"
+ # This should work in at least 4% of the cases...
+ for i in $(seq 25); do
+ testfailure apt update "$@"
+ if ! grep 'rred:600' rootdir/tmp/testfailure.output; then
+ break
+ fi
+ done
webserverconfig 'aptwebserver::overwrite::.*Contents-.*::filename' '/Contents-i386.gz'
cp rootdir/tmp/testfailure.output patchdownload.output
testfailure grep 'rred:600' patchdownload.output