From e6ebc2bad6e5544faff69d9ecf63ff185b3a44ac Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Fri, 22 Nov 2024 13:58:46 +0300 Subject: [PATCH] sleep -> fast_forward --- contracts/context-config/tests/sandbox.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contracts/context-config/tests/sandbox.rs b/contracts/context-config/tests/sandbox.rs index 6f0b2b2e1..8282be74e 100644 --- a/contracts/context-config/tests/sandbox.rs +++ b/contracts/context-config/tests/sandbox.rs @@ -1154,7 +1154,7 @@ async fn test_storage_usage_matches_code_size() -> eyre::Result<()> { let expected_log = format!("Context `{}` added", context_id); assert!(res.logs().iter().any(|log| log == &expected_log)); - time::sleep(time::Duration::from_secs(1)).await; + worker.fast_forward(1).await?; let node1_balance_after = worker.view_account(&node1.id()).await?.balance; @@ -1220,7 +1220,7 @@ async fn test_storage_usage_matches_code_size() -> eyre::Result<()> { assert!(res.failures().is_empty(), "{:#?}", res.failures()); - time::sleep(time::Duration::from_secs(1)).await; + worker.fast_forward(1).await?; let node1_balance_after = worker.view_account(&node1.id()).await?.balance; @@ -1300,7 +1300,7 @@ async fn test_storage_usage_matches_code_size() -> eyre::Result<()> { assert!(res.failures().is_empty(), "{:#?}", res.failures()); - time::sleep(time::Duration::from_secs(1)).await; + worker.fast_forward(1).await?; let node1_balance_after = worker.view_account(&node1.id()).await?.balance;