Skip to content

Commit

Permalink
chore: add sleeps between quote and mint
Browse files Browse the repository at this point in the history
  • Loading branch information
thesimplekid committed Oct 1, 2024
1 parent fc0cc67 commit 48ac30b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion crates/cdk-integration-tests/tests/fake_wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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?;
Expand Down Expand Up @@ -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?;
Expand Down Expand Up @@ -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?;
Expand Down Expand Up @@ -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?;
Expand Down Expand Up @@ -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?;
Expand Down

0 comments on commit 48ac30b

Please sign in to comment.