From b0e0fc44cfa44c5a5a677faca9b00e1b76eceb1b Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Sat, 28 Jan 2023 03:32:21 -0500 Subject: [PATCH] Add secondary while loop to serai/client's test runner There's a failing CI run on a node which booted, yet didn't create a genesis yet. Apparently, the RPC is potentially accessible before the chain is in. This attempts to resolve that. --- substrate/serai/client/tests/runner.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/substrate/serai/client/tests/runner.rs b/substrate/serai/client/tests/runner.rs index 1e9e7444..777d5700 100644 --- a/substrate/serai/client/tests/runner.rs +++ b/substrate/serai/client/tests/runner.rs @@ -106,6 +106,9 @@ macro_rules! serai_test { while Serai::new(URL).await.is_err() { tokio::time::sleep(Duration::from_secs(1)).await; } + while Serai::new(URL).await.unwrap().get_latest_block_hash().await.is_err() { + tokio::time::sleep(Duration::from_secs(1)).await; + } command };