diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 587f55677..4ef3976a5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -395,22 +395,6 @@ jobs: env: PGHOST: localhost run: | - watchdog() { - sleep 1800 - pid=$(pgrep -x simplexmq-test | head -1) - echo "::group::simplexmq-test is still running after 30 minutes" - for p in $pid $(pgrep -P "$pid") $(for c in $(pgrep -P "$pid"); do pgrep -P "$c"; done); do - ps -o pid,ppid,stat,etime,command -p "$p" - for task in /proc/"$p"/task/*; do - echo "--- $p thread ${task##*/} $(cat "$task"/comm) $(cat "$task"/wchan)" - sudo cat "$task"/stack - done - done - echo "::endgroup::" - kill "$pid" - } - watchdog & - watchdog=$! i=1 attempts=1 ${{ (github.ref == 'refs/heads/stable' || startsWith(github.ref, 'refs/tags/v')) }} && attempts=3 @@ -423,7 +407,6 @@ jobs: sleep 1 fi done - kill "$watchdog" || true if [ "$i" -gt "$attempts" ]; then echo "All "$attempts" attempts failed." exit 1 diff --git a/tests/Test.hs b/tests/Test.hs index 8c87e54ab..cecfb7f98 100644 --- a/tests/Test.hs +++ b/tests/Test.hs @@ -63,18 +63,11 @@ import PostgresSchemaDump (postgresSchemaDumpTest) import SMPClient (postgressBracket) #endif -#if MIN_VERSION_base(4,18,0) -import Control.Concurrent (forkIO, threadDelay) -import Control.Monad (forM_, void) -import GHC.Conc.Sync (listThreads, threadLabel, threadStatus) -#endif - logCfg :: LogConfig logCfg = LogConfig {lc_file = Nothing, lc_stderr = True} main :: IO () main = do - dumpThreadsAfter 25 setLogLevel testLogLevel withGlobalLogging logCfg $ do setEnv "APNS_KEY_ID" "H82WD9K9AQ" @@ -203,20 +196,6 @@ main = do describe "Agent SQLite schema dump" schemaDumpTest #endif -dumpThreadsAfter :: Int -> IO () -#if MIN_VERSION_base(4,18,0) -dumpThreadsAfter minutes = void . forkIO $ do - threadDelay $ minutes * 60000000 - ts <- listThreads - putStrLn $ "=== " <> show (length ts) <> " threads after " <> show minutes <> " minutes" - forM_ ts $ \t -> do - s <- threadStatus t - l <- threadLabel t - putStrLn $ show t <> " " <> show s <> " " <> maybe "" id l -#else -dumpThreadsAfter _ = pure () -#endif - hspecInTmpDir :: Spec -> IO () hspecInTmpDir spec = do (config, forest) <- evalSpec defaultConfig spec