Skip to content

Commit 5605fbd

Browse files
authored
test-runtime: Add exponential backoff (paritytech#518)
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
1 parent 8afb2e5 commit 5605fbd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test-runtime/build.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ async fn run() {
6464

6565
// Download metadata from binary; retry until successful, or a limit is hit.
6666
let metadata_bytes: sp_core::Bytes = {
67-
const MAX_RETRIES: usize = 20;
67+
const MAX_RETRIES: usize = 6;
6868
let mut retries = 0;
6969

7070
loop {
@@ -85,7 +85,7 @@ async fn run() {
8585
break res
8686
}
8787
_ => {
88-
thread::sleep(time::Duration::from_secs(1));
88+
thread::sleep(time::Duration::from_secs(1 << retries));
8989
retries += 1;
9090
}
9191
};

0 commit comments

Comments
 (0)