From 206e3dbb73a701371034207529e721e1bb7f4c1e Mon Sep 17 00:00:00 2001 From: AlexD10S Date: Wed, 18 Dec 2024 12:36:06 +0100 Subject: [PATCH] test: increase sleep time in run_contracts_node --- crates/pop-contracts/src/node/mod.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/crates/pop-contracts/src/node/mod.rs b/crates/pop-contracts/src/node/mod.rs index 425a2d05..e87c9f07 100644 --- a/crates/pop-contracts/src/node/mod.rs +++ b/crates/pop-contracts/src/node/mod.rs @@ -132,8 +132,8 @@ pub async fn run_contracts_node( let process = command.spawn()?; - // Wait 5 secs until the node is ready - sleep(Duration::from_millis(5000)).await; + // Wait 20 secs until the node is ready + sleep(Duration::from_millis(20000)).await; let data = Value::from_bytes(subxt::utils::to_hex("initialize contracts node")); let payload = subxt::dynamic::tx("System", "remark", [data].to_vec()); @@ -165,18 +165,20 @@ fn release_directory_by_target(tag: Option<&str>) -> Result<&'static str, Error> // The structure of the binary changed in v0.42.0 let is_old_structure = matches!(tag, Some(tag) if tag < "v0.42.0"); match OS { - "macos" => + "macos" => { if is_old_structure { Ok("artifacts/substrate-contracts-node-mac/substrate-contracts-node") } else { Ok("substrate-contracts-node-mac/substrate-contracts-node") - }, - "linux" => + } + }, + "linux" => { if is_old_structure { Ok("artifacts/substrate-contracts-node-linux/substrate-contracts-node") } else { Ok("substrate-contracts-node-linux/substrate-contracts-node") - }, + } + }, _ => Err(Error::UnsupportedPlatform { arch: ARCH, os: OS }), } }