]> git.saurik.com Git - apt.git/commitdiff
test-apt-download-progress: Run the https test multiple times
authorJulian Andres Klode <jak@debian.org>
Mon, 14 Dec 2015 15:43:27 +0000 (16:43 +0100)
committerJulian Andres Klode <jak@debian.org>
Mon, 14 Dec 2015 15:43:27 +0000 (16:43 +0100)
This filters out errors due to timing issues. Early exits if
enough pulses occured.

test/integration/test-apt-download-progress

index 09c5967151e7a67e7cc1524fb75f66b466bd4d19..b316b93ef17cae3a0b855ca2eafbfefbca6112f3 100755 (executable)
@@ -34,8 +34,13 @@ testsuccess --nomsg apthelper download-file "http://localhost:${APTHTTPPORT}/$TE
 assertprogress apt-progress.log
 
 msgtest 'download progress works via' 'https'
-exec 3> apt-progress.log
-testsuccess --nomsg apthelper download-file "https://localhost:${APTHTTPSPORT}/$TESTFILE" ./downloaded/https-$TESTFILE $OPT -o Acquire::https::Dl-Limit=600
+for i in 1 2 3 4 5; do
+    exec 3> apt-progress.log
+    testsuccess --nomsg apthelper download-file "https://localhost:${APTHTTPSPORT}/$TESTFILE" ./downloaded/https-$TESTFILE $OPT -o Acquire::https::Dl-Limit=600
+    if [ "$(wc -l  apt-progress.log | awk '{print $1}')" -ge 3 ]; then
+        break
+    fi
+done
 assertprogress apt-progress.log
 
 # cleanup