This commit is contained in:
Evgeny @ SimpleX Chat committed 2026-10-23 06:59:31 +00:00
1 parent 545819d050
commit 38a94fe98c
2 files changed
-38

No files matched your search

-17
View File
@@ -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
-21
View File
@@ -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