From 741f97efff80bc8603130d5a217fd83c65631b1b Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Fri, 22 Jan 2021 19:43:28 +1100 Subject: [PATCH] Log state on failure --- swap/src/tests/happy_path_restart_bob_after_comm.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/swap/src/tests/happy_path_restart_bob_after_comm.rs b/swap/src/tests/happy_path_restart_bob_after_comm.rs index 8d907fbd..c3b14c2f 100644 --- a/swap/src/tests/happy_path_restart_bob_after_comm.rs +++ b/swap/src/tests/happy_path_restart_bob_after_comm.rs @@ -14,10 +14,18 @@ async fn given_bob_restarts_after_encsig_is_sent_resume_swap() { let bob_state = bob::run_until(bob_swap, is_encsig_sent).await.unwrap(); - assert!(matches!(bob_state, BobState::EncSigSent {..})); + assert!( + matches!(bob_state, BobState::EncSigSent {..}), + "bob_state: {:?}", + bob_state + ); let bob_swap = ctx.recover_bob_from_db().await; - assert!(matches!(bob_swap.state, BobState::EncSigSent {..})); + assert!( + matches!(bob_swap.state, BobState::EncSigSent {..}), + "bob_swap.state: {:?}", + bob_swap.state + ); let bob_state = bob::run(bob_swap).await.unwrap();