Skip to content

Commit

Permalink
Provide clearer failure-reason when wallet is not syncing
Browse files Browse the repository at this point in the history
  • Loading branch information
Anviking committed Apr 29, 2019
1 parent 4e2d11a commit 6059c7a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/integration/Cardano/WalletSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 6059c7a

Please sign in to comment.