]> git.saurik.com Git - apt.git/blobdiff - test/integration/test-apt-download-progress
test-apt-download-progress: Run the https test multiple times
[apt.git] / test / integration / test-apt-download-progress
index 07c61ababd836658012c899954a595dfc7bf72aa..b316b93ef17cae3a0b855ca2eafbfefbca6112f3 100755 (executable)
@@ -30,12 +30,17 @@ OPT='-o APT::Status-Fd=3 -o Debug::pkgAcquire::Worker=1 -o Debug::Acquire::http=
 
 msgtest 'download progress works via' 'http'
 exec 3> apt-progress.log
-testsuccess --nomsg apthelper download-file "http://localhost:${APTHTTPPORT}/$TESTFILE" ./downloaded/http-$TESTFILE $OPT -o Acquire::http::Dl-Limit=800
+testsuccess --nomsg apthelper download-file "http://localhost:${APTHTTPPORT}/$TESTFILE" ./downloaded/http-$TESTFILE $OPT -o Acquire::http::Dl-Limit=600
 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=800
+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