test-runtime: Add exponential backoff (#518)

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
Alexandru Vasile
2022-04-27 13:58:33 +03:00
committed by GitHub
parent 8afb2e55a3
commit 5605fbd308
+2 -2
View File
@@ -64,7 +64,7 @@ async fn run() {
// Download metadata from binary; retry until successful, or a limit is hit.
let metadata_bytes: sp_core::Bytes = {
const MAX_RETRIES: usize = 20;
const MAX_RETRIES: usize = 6;
let mut retries = 0;
loop {
@@ -85,7 +85,7 @@ async fn run() {
break res
}
_ => {
thread::sleep(time::Duration::from_secs(1));
thread::sleep(time::Duration::from_secs(1 << retries));
retries += 1;
}
};