File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
ouroboros-network/testlib/Test/Ouroboros/Network/Diffusion/Testnet Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 16
16
17
17
module Test.Ouroboros.Network.Diffusion.Testnet.Cardano (tests ) where
18
18
19
- import Control.Exception (AssertionFailed (.. ), catch , evaluate , fromException )
19
+ import Control.Exception (AssertionFailed (.. ), catch , displayException ,
20
+ evaluate , fromException )
20
21
import Control.Monad.Class.MonadFork
21
22
import Control.Monad.Class.MonadTest (exploreRaces )
22
23
import Control.Monad.Class.MonadTime.SI (DiffTime , Time (Time ), addTime ,
@@ -2259,13 +2260,15 @@ prop_accept_failure (AbsIOError ioerr) =
2259
2260
counterexample (show evs)
2260
2261
. (if isFatalAccept ioerr
2261
2262
then -- verify that the node was killed by the right exception
2262
- any (\ case
2263
+ counterexample (" fatal exception " ++ displayException ioerr ++ " not propagated" )
2264
+ . any (\ case
2263
2265
TrErrored e | Just e' <- fromException e
2264
2266
, e' == ioerr
2265
2267
-> True
2266
2268
_ -> False )
2267
2269
else -- verify that the node was not killed by the `ioerr` exception
2268
- all (\ case
2270
+ counterexample (" non-fatal exception " ++ displayException ioerr ++ " propagated" )
2271
+ . all (\ case
2269
2272
TrErrored {} -> False
2270
2273
_ -> True )
2271
2274
)
You can’t perform that action at this time.
0 commit comments