Skip to content

Commit

Permalink
Fix transaction test
Browse files Browse the repository at this point in the history
Fix cabal.project
Update TraceLastShutdownUnclean's severity annotation to Warning
  • Loading branch information
Jimbo4350 committed Sep 17, 2024
1 parent a4b8f55 commit ac6e894
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ packages:

extra-packages: Cabal

-- program-options
-- ghc-options: -Werror
program-options
ghc-options: -Werror

test-show-details: direct

Expand Down
2 changes: 1 addition & 1 deletion cardano-node/cardano-node.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ common project-config
-Wunused-packages
common maybe-Win32
if os(windows)
build-depends: Win32
build-depends: Win32

common maybe-unix
if !os(windows)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ instance HasSeverityAnnotation (ChainDB.TraceEvent blk) where
VolDb.Truncate{} -> Error
VolDb.InvalidFileNames{} -> Warning
VolDb.DBClosed{} -> Info
getSeverityAnnotation ChainDB.TraceLastShutdownUnclean = Info
getSeverityAnnotation ChainDB.TraceLastShutdownUnclean = Warning

instance HasSeverityAnnotation (LedgerEvent blk) where
getSeverityAnnotation (LedgerUpdate _) = Notice
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ import qualified Hedgehog.Extras.Test.File as H
import qualified Hedgehog.Extras.Test.Golden as H
import qualified Hedgehog.Extras.Test.TestWatchdog as H

-- | Execute me with:
-- @DISABLE_RETRIES=1 cabal test cardano-testnet-test --test-options '-p "/transaction/"'@
hprop_transaction :: Property
hprop_transaction = integrationRetryWorkspace 0 "submit-api-transaction" $ \tempAbsBasePath' -> H.runWithDefaultWatchdog_ $ do
H.note_ SYS.os
Expand Down Expand Up @@ -156,7 +158,7 @@ hprop_transaction = integrationRetryWorkspace 0 "submit-api-transaction" $ \temp
UTxO utxo2 <- H.noteShowM $ decodeEraUTxO sbe utxo2Json
txouts2 <- H.noteShow $ L.unCoin . txOutValueLovelace . txOutValue . snd <$> Map.toList utxo2

H.assert $ 5_000_001 `List.elem` txouts2
H.assert $ 15_000_003_000_000 `List.elem` txouts2

response <- H.byDurationM 1 5 "Expected UTxO found" $ do
txBodySigned <- H.leftFailM $ H.readJsonFile @Aeson.Value txbodySignedFp
Expand Down

0 comments on commit ac6e894

Please sign in to comment.