From 5605fbd3086f138c90cfa97a95eea764ee50677b Mon Sep 17 00:00:00 2001 From: Alexandru Vasile <60601340+lexnv@users.noreply.github.com> Date: Wed, 27 Apr 2022 13:58:33 +0300 Subject: [PATCH] test-runtime: Add exponential backoff (#518) Signed-off-by: Alexandru Vasile --- test-runtime/build.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-runtime/build.rs b/test-runtime/build.rs index c052cf4c69..746550b425 100644 --- a/test-runtime/build.rs +++ b/test-runtime/build.rs @@ -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; } };