From b00e604c6fdf6857ddf9a2ab871e8aa36e78252d Mon Sep 17 00:00:00 2001 From: qima Date: Sun, 15 Dec 2024 22:53:00 +0800 Subject: [PATCH] chore: extra sleep --- .github/workflows/merge.yml | 2 +- autonomi/src/client/mod.rs | 6 ++++++ autonomi/tests/put.rs | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 60faed6af6..f0b2b4c9d2 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -578,7 +578,7 @@ jobs: - name: Stop the local network and upload logs if: always() - uses: maidsafe/ant-local-testnet-action@main + uses: maidsafe/ant-local-testnet-action@feat-addrs-logs with: action: stop log_file_prefix: safe_test_logs_e2e diff --git a/autonomi/src/client/mod.rs b/autonomi/src/client/mod.rs index fae0a87ba8..352eb53f5d 100644 --- a/autonomi/src/client/mod.rs +++ b/autonomi/src/client/mod.rs @@ -120,6 +120,12 @@ impl Client { receiver.await.expect("sender should not close")?; debug!("Client is connected to the network"); + // With the switch to the new bootstrap cache scheme, + // Seems the too many `initial dial`s could result in failure, + // if startup quoting/upload tasks got started up immediatly. + // Hence, put in a forced duration to allow `initial network discovery` to be completed. + std::thread::sleep(std::time::Duration::from_secs(10)); + Ok(Self { network, client_event_sender: Arc::new(None), diff --git a/autonomi/tests/put.rs b/autonomi/tests/put.rs index f5d411e691..eff1de41c4 100644 --- a/autonomi/tests/put.rs +++ b/autonomi/tests/put.rs @@ -25,6 +25,8 @@ async fn put() -> Result<()> { sleep(Duration::from_secs(10)).await; + // sleep(Duration::from_secs(10)).await; + let data_fetched = client.data_get_public(addr).await?; assert_eq!(data, data_fetched, "data fetched should match data put");