From df44bfdafa1b94d908a00d0900b4bcd5abdecbcd Mon Sep 17 00:00:00 2001 From: Edmund Noble Date: Mon, 16 Dec 2024 14:19:01 -0500 Subject: [PATCH] add advanceAllChains_ --- test/unit/Chainweb/Test/Pact5/CutFixture.hs | 8 ++++++++ test/unit/Chainweb/Test/Pact5/RemotePactTest.hs | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/test/unit/Chainweb/Test/Pact5/CutFixture.hs b/test/unit/Chainweb/Test/Pact5/CutFixture.hs index 75809ac8e..d9f2ac562 100644 --- a/test/unit/Chainweb/Test/Pact5/CutFixture.hs +++ b/test/unit/Chainweb/Test/Pact5/CutFixture.hs @@ -30,6 +30,7 @@ module Chainweb.Test.Pact5.CutFixture , fixtureMempools , fixturePactQueues , advanceAllChains + , advanceAllChains_ , withTestCutDb ) where @@ -146,6 +147,13 @@ advanceAllChains v Fixture{..} = do return (finalCut, onChains perChainCommandResults) +advanceAllChains_ + :: HasCallStack + => ChainwebVersion + -> Fixture + -> IO () +advanceAllChains_ v f = void $ advanceAllChains v f + withTestCutDb :: (Logger logger) => logger -> ChainwebVersion diff --git a/test/unit/Chainweb/Test/Pact5/RemotePactTest.hs b/test/unit/Chainweb/Test/Pact5/RemotePactTest.hs index 26ed29332..38d37eb0d 100644 --- a/test/unit/Chainweb/Test/Pact5/RemotePactTest.hs +++ b/test/unit/Chainweb/Test/Pact5/RemotePactTest.hs @@ -171,7 +171,7 @@ pollingConfirmationDepthTest baseRdb = runResourceT $ do pollingWithDepth v cid clientEnv rks (Just (ConfirmationDepth 0)) >>= \response -> do assertEqual "there are no command results at depth 0" response HashMap.empty - _ <- CutFixture.advanceAllChains v (fixture ^. cutFixture) + CutFixture.advanceAllChains_ v (fixture ^. cutFixture) pollingWithDepth v cid clientEnv rks Nothing >>= \response -> do assertEqual "results are visible at depth 0" 2 (HashMap.size response) @@ -180,7 +180,7 @@ pollingConfirmationDepthTest baseRdb = runResourceT $ do pollingWithDepth v cid clientEnv rks (Just (ConfirmationDepth 1)) >>= \response -> do assertEqual "results are not visible at depth 1" 0 (HashMap.size response) - _ <- CutFixture.advanceAllChains v (fixture ^. cutFixture) + CutFixture.advanceAllChains_ v (fixture ^. cutFixture) pollingWithDepth v cid clientEnv rks Nothing >>= \response -> do assertEqual "results are visible at depth 0" 2 (HashMap.size response) @@ -191,7 +191,7 @@ pollingConfirmationDepthTest baseRdb = runResourceT $ do pollingWithDepth v cid clientEnv rks (Just (ConfirmationDepth 2)) >>= \response -> do assertEqual "results are not visible at depth 2" 0 (HashMap.size response) - _ <- CutFixture.advanceAllChains v (fixture ^. cutFixture) + CutFixture.advanceAllChains_ v (fixture ^. cutFixture) pollingWithDepth v cid clientEnv rks Nothing >>= \response -> do assertEqual "results are visible at depth 0" 2 (HashMap.size response)