summaryrefslogtreecommitdiff
path: root/test/integration/test-bug-869859-retry-downloads
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2021-07-28 12:43:56 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2021-07-28 13:08:35 +0200
commit4001af8920389e2bb2672b673b181c4e92515872 (patch)
tree67c71f916fa5f248761ae2799a941fe67e5ce5c4 /test/integration/test-bug-869859-retry-downloads
parent51ee79e385d8ccb2f32195cc01f3f9c943197603 (diff)
Add support for a maximum delay and testing of delay
This is very basic support on the testing side, we just test the debug output but not how long it actually took. Would be nice to check time really.
Diffstat (limited to 'test/integration/test-bug-869859-retry-downloads')
-rwxr-xr-xtest/integration/test-bug-869859-retry-downloads13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/integration/test-bug-869859-retry-downloads b/test/integration/test-bug-869859-retry-downloads
index 86203f794..66e158a9d 100755
--- a/test/integration/test-bug-869859-retry-downloads
+++ b/test/integration/test-bug-869859-retry-downloads
@@ -21,7 +21,18 @@ rm -f testpkg_1_all.deb
msgmsg 'Fail after too many retries'
webserverconfig 'aptwebserver::failrequest' '429'
webserverconfig 'aptwebserver::failrequest::pool/testpkg_1_all.deb' '99'
-testfailure apt download testpkg -o acquire::retries=3
+testfailureequal "Delaying http://localhost:${APTHTTPPORT} stable/main all testpkg all 1 by 1 seconds
+Ign:1 http://localhost:${APTHTTPPORT} stable/main all testpkg all 1
+ 429 Unknown HTTP code
+Delaying http://localhost:${APTHTTPPORT} stable/main all testpkg all 1 by 2 seconds
+Ign:1 http://localhost:${APTHTTPPORT} stable/main all testpkg all 1
+ 429 Unknown HTTP code
+Delaying http://localhost:${APTHTTPPORT} stable/main all testpkg all 1 by 4 seconds
+Ign:1 http://localhost:${APTHTTPPORT} stable/main all testpkg all 1
+ 429 Unknown HTTP code
+Err:1 http://localhost:${APTHTTPPORT} stable/main all testpkg all 1
+ 429 Unknown HTTP code
+E: Failed to fetch http://localhost:${APTHTTPPORT}/pool/testpkg_1_all.deb 429 Unknown HTTP code" apt download testpkg -o acquire::retries=3 -o debug::acquire::retries=true -q
testfailure test -f testpkg_1_all.deb
msgmsg 'Success in the third try'