Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Shutdown test for new exit codes #5391

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import qualified Testnet.Property.Utils as H

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

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