mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-09-24 22:58:30 -04:00
Ensure we wait for other party to complete
Before we check the balances.
This commit is contained in:
parent
1fa812b727
commit
e079b84500
2 changed files with 10 additions and 4 deletions
|
@ -90,7 +90,7 @@ async fn given_alice_restarts_after_encsig_is_learned_resume_swap() {
|
|||
let alice_db = Database::open(alice_db_datadir.path()).unwrap();
|
||||
|
||||
tokio::spawn(async move { alice_event_loop.run().await });
|
||||
tokio::spawn(bob_fut);
|
||||
let bob_swap_handle = tokio::spawn(bob_fut);
|
||||
tokio::spawn(bob_event_loop.run());
|
||||
|
||||
let alice_swap_id = Uuid::new_v4();
|
||||
|
@ -136,6 +136,9 @@ async fn given_alice_restarts_after_encsig_is_learned_resume_swap() {
|
|||
.await
|
||||
.unwrap();
|
||||
|
||||
// Wait for Bob to finish
|
||||
bob_swap_handle.await.unwrap().unwrap();
|
||||
|
||||
assert!(matches!(alice_state, AliceState::BtcRedeemed {..}));
|
||||
|
||||
let btc_alice_final = alice_btc_wallet.as_ref().balance().await.unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue