From 6059c7aea676113341186667f42be9813407627a Mon Sep 17 00:00:00 2001 From: Johannes Lund Date: Mon, 29 Apr 2019 15:38:24 +0200 Subject: [PATCH] Provide clearer failure-reason when wallet is not syncing --- test/integration/Cardano/WalletSpec.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/integration/Cardano/WalletSpec.hs b/test/integration/Cardano/WalletSpec.hs index 36892626a3f..6a6882e1304 100644 --- a/test/integration/Cardano/WalletSpec.hs +++ b/test/integration/Cardano/WalletSpec.hs @@ -28,10 +28,12 @@ import Control.Concurrent ( threadDelay ) import Control.Concurrent.Async ( async, cancel ) +import Control.Monad + ( unless ) import Data.Text.Class ( toText ) import Test.Hspec - ( Spec, after, before, it, shouldSatisfy ) + ( Spec, after, before, expectationFailure, it ) import qualified Cardano.Wallet.DB.MVar as MVar import qualified Cardano.Wallet.Network.HttpBridge as HttpBridge @@ -50,7 +52,8 @@ spec = do unsafeRunExceptT $ restoreWallet wallet wid threadDelay 2000000 tip <- currentTip . fst <$> unsafeRunExceptT (readWallet wallet wid) - tip `shouldSatisfy` (> (SlotId 0 0)) + unless (tip > (SlotId 0 0)) $ + expectationFailure ("The wallet tip is still " ++ show tip) where port = 1337 closeBridge (handle, _) = do