Skip to content

Commit

Permalink
chore: extra sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
maqi committed Dec 16, 2024
1 parent 2ea9e13 commit 3f051bc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions autonomi/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
tokio::time::sleep(std::time::Duration::from_secs(10));

Ok(Self {
network,
client_event_sender: Arc::new(None),
Expand Down
5 changes: 5 additions & 0 deletions autonomi/tests/put.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,18 @@ async fn put() -> Result<()> {
let _log_appender_guard = LogBuilder::init_single_threaded_tokio_test("put", false);

let client = Client::connect(&peers_from_env()?).await?;

// sleep(Duration::from_secs(10)).await;

let wallet = get_funded_wallet();
let data = gen_random_data(1024 * 1024 * 10);

let addr = client.data_put_public(data.clone(), wallet.into()).await?;

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");

Expand Down

0 comments on commit 3f051bc

Please sign in to comment.