Skip to content

Commit 158e321

Browse files
authored
Merge pull request cashubtc#652 from ok300/ok300-fix-integration-test-loop
Integration tests: fix `wait_for_mint_to_be_paid` loop
2 parents 7a97510 + 3ba3449 commit 158e321

File tree

1 file changed

+3
-3
lines changed
  • crates/cdk-integration-tests/src

1 file changed

+3
-3
lines changed

crates/cdk-integration-tests/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::sync::Arc;
22

3-
use anyhow::{bail, Result};
3+
use anyhow::{anyhow, bail, Result};
44
use cdk::amount::{Amount, SplitTarget};
55
use cdk::nuts::nut00::ProofsMethods;
66
use cdk::nuts::{MintQuoteState, NotificationPayload, State};
@@ -86,7 +86,7 @@ pub async fn wait_for_mint_to_be_paid(
8686
}
8787
}
8888
}
89-
Ok(())
89+
Err(anyhow!("Subscription ended without quote being paid"))
9090
};
9191

9292
let timeout_future = timeout(Duration::from_secs(timeout_secs), wait_future);
@@ -114,7 +114,7 @@ pub async fn wait_for_mint_to_be_paid(
114114
result = timeout_future => {
115115
match result {
116116
Ok(payment_result) => payment_result,
117-
Err(_) => Err(anyhow::anyhow!("Timeout waiting for mint quote to be paid")),
117+
Err(_) => Err(anyhow!("Timeout waiting for mint quote to be paid")),
118118
}
119119
}
120120
result = periodic_task => {

0 commit comments

Comments
 (0)