mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-02 11:36:09 -04:00
Join all futures to avoid hanging tests
This commit is contained in:
parent
2abf65f3b6
commit
e366d3a73b
4 changed files with 37 additions and 24 deletions
|
@ -76,7 +76,7 @@ async fn given_alice_restarts_after_encsig_is_learned_resume_swap() {
|
|||
let bob_btc_wallet_clone = bob_btc_wallet.clone();
|
||||
let bob_xmr_wallet_clone = bob_xmr_wallet.clone();
|
||||
|
||||
let _ = tokio::spawn(bob::swap::swap(
|
||||
let bob_fut = bob::swap::swap(
|
||||
bob_state,
|
||||
bob_event_loop_handle,
|
||||
bob_db,
|
||||
|
@ -86,14 +86,14 @@ async fn given_alice_restarts_after_encsig_is_learned_resume_swap() {
|
|||
Uuid::new_v4(),
|
||||
alice_peer_id,
|
||||
alice_multiaddr.clone(),
|
||||
));
|
||||
|
||||
let _bob_swarm_fut = tokio::spawn(async move { bob_event_loop.run().await });
|
||||
);
|
||||
|
||||
let alice_db_datadir = tempdir().unwrap();
|
||||
let alice_db = Database::open(alice_db_datadir.path()).unwrap();
|
||||
|
||||
let _alice_swarm_fut = tokio::spawn(async move { alice_event_loop.run().await });
|
||||
tokio::spawn(async move { alice_event_loop.run().await });
|
||||
tokio::spawn(bob_fut);
|
||||
tokio::spawn(bob_event_loop.run());
|
||||
|
||||
let alice_swap_id = Uuid::new_v4();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue