Skip to content

Commit e1fe5e6

Browse files
committed
Fix Shutdown test for new exit codes
1 parent d5b8b72 commit e1fe5e6

File tree

1 file changed

+4
-2
lines changed
  • cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Node

1 file changed

+4
-2
lines changed

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Node/Shutdown.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import qualified Testnet.Property.Utils as H
3939

4040
import Cardano.Testnet
4141
import Data.Either (isRight)
42-
import GHC.IO.Exception (ExitCode (ExitSuccess, ExitFailure))
42+
import GHC.IO.Exception (ExitCode (ExitFailure, ExitSuccess))
4343
import GHC.Stack (callStack)
4444
import System.Process (interruptProcessGroupOf)
4545
import Testnet.Defaults
@@ -233,7 +233,9 @@ hprop_shutdownOnSigint = H.integrationRetryWorkspace 2 "shutdown-on-sigint" $ \t
233233
when (isRight mExitCodeRunning) $ do
234234
H.cat (nodeStdout node)
235235
H.cat (nodeStderr node)
236-
mExitCodeRunning === Right (ExitFailure 1)
236+
case mExitCodeRunning of
237+
Right (ExitFailure _) -> H.success
238+
other -> H.failMessage callStack $ "Unexpected exit status for the testnet process: " <> show other
237239

238240
logs <- H.readFile (nodeStdout node)
239241
case mapMaybe parseMsg $ reverse $ lines logs of

0 commit comments

Comments
 (0)