From 965b2b3fa1afa00638c355249c644aa858396568 Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 4 Oct 2022 10:05:01 +1000 Subject: [PATCH 1/2] Add a timeout to the non_blocking_logger test --- zebrad/tests/acceptance.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zebrad/tests/acceptance.rs b/zebrad/tests/acceptance.rs index cc99d535658..208b9659779 100644 --- a/zebrad/tests/acceptance.rs +++ b/zebrad/tests/acceptance.rs @@ -1353,7 +1353,8 @@ fn non_blocking_logger() -> Result<()> { let zebra_rpc_address = config.rpc.listen_addr.unwrap(); let dir = testdir()?.with_config(&mut config)?; - let mut child = dir.spawn_child(args!["start"])?; + let mut child = dir.spawn_child(args!["start"])?.with_timeout(TINY_CHECKPOINT_TIMEOUT); + // Wait until port is open. child.expect_stdout_line_matches( format!("Opened RPC endpoint at {}", config.rpc.listen_addr.unwrap()).as_str(), From ce5ae7070b15ca4816387eb9bc0633a987d032fc Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 4 Oct 2022 10:10:05 +1000 Subject: [PATCH 2/2] Make rustfmt happy --- zebrad/tests/acceptance.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zebrad/tests/acceptance.rs b/zebrad/tests/acceptance.rs index 208b9659779..c4913c83ef2 100644 --- a/zebrad/tests/acceptance.rs +++ b/zebrad/tests/acceptance.rs @@ -1353,8 +1353,10 @@ fn non_blocking_logger() -> Result<()> { let zebra_rpc_address = config.rpc.listen_addr.unwrap(); let dir = testdir()?.with_config(&mut config)?; - let mut child = dir.spawn_child(args!["start"])?.with_timeout(TINY_CHECKPOINT_TIMEOUT); - + let mut child = dir + .spawn_child(args!["start"])? + .with_timeout(TINY_CHECKPOINT_TIMEOUT); + // Wait until port is open. child.expect_stdout_line_matches( format!("Opened RPC endpoint at {}", config.rpc.listen_addr.unwrap()).as_str(),