From 48ac30b973bd7b61a9585f7debbc99bb01a9482a Mon Sep 17 00:00:00 2001 From: thesimplekid Date: Tue, 1 Oct 2024 21:14:30 +0200 Subject: [PATCH] chore: add sleeps between quote and mint --- crates/cdk-integration-tests/tests/fake_wallet.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/crates/cdk-integration-tests/tests/fake_wallet.rs b/crates/cdk-integration-tests/tests/fake_wallet.rs index da505d3e1..59b744841 100644 --- a/crates/cdk-integration-tests/tests/fake_wallet.rs +++ b/crates/cdk-integration-tests/tests/fake_wallet.rs @@ -27,7 +27,7 @@ async fn test_fake_tokens_pending() -> Result<()> { let mint_quote = wallet.mint_quote(100.into(), None).await?; - sleep(Duration::from_secs(5)).await; + sleep(Duration::from_millis(5)).await; let _mint_amount = wallet .mint(&mint_quote.id, SplitTarget::default(), None) @@ -67,6 +67,8 @@ async fn test_fake_melt_payment_fail() -> Result<()> { let mint_quote = wallet.mint_quote(100.into(), None).await?; + sleep(Duration::from_millis(5)).await; + let _mint_amount = wallet .mint(&mint_quote.id, SplitTarget::default(), None) .await?; @@ -128,6 +130,8 @@ async fn test_fake_melt_payment_fail_and_check() -> Result<()> { let mint_quote = wallet.mint_quote(100.into(), None).await?; + sleep(Duration::from_millis(5)).await; + let _mint_amount = wallet .mint(&mint_quote.id, SplitTarget::default(), None) .await?; @@ -171,6 +175,8 @@ async fn test_fake_melt_payment_return_fail_status() -> Result<()> { let mint_quote = wallet.mint_quote(100.into(), None).await?; + sleep(Duration::from_millis(5)).await; + let _mint_amount = wallet .mint(&mint_quote.id, SplitTarget::default(), None) .await?; @@ -229,6 +235,8 @@ async fn test_fake_melt_payment_error_unknown() -> Result<()> { let mint_quote = wallet.mint_quote(100.into(), None).await?; + sleep(Duration::from_millis(5)).await; + let _mint_amount = wallet .mint(&mint_quote.id, SplitTarget::default(), None) .await?; @@ -288,6 +296,8 @@ async fn test_fake_melt_payment_err_paid() -> Result<()> { let mint_quote = wallet.mint_quote(100.into(), None).await?; + sleep(Duration::from_millis(5)).await; + let _mint_amount = wallet .mint(&mint_quote.id, SplitTarget::default(), None) .await?;