From 05874d6ddb5e0646d1f46d158c2c4912c50aaf5e Mon Sep 17 00:00:00 2001 From: Philipp Wagner Date: Mon, 26 Oct 2026 10:29:18 +0100 Subject: [PATCH] test: print all threads when a test times out The rare CI hang in SelectedStationMessageUiVisualRenderingTest blocks on a monitor in SnapshotStateObserver.observeReads (line 643 is the monitorenter of observedScopeMapsLock in Compose 1.8.2). The timed-out thread's stack shows where it waits but not which thread holds the lock. With the thread dump enabled, JUnit prints every thread to the test's standard output, which ends up in the XML report of the test-results artifact. Claude-Session: https://claude.ai/code/session_01FJBfPYm6rCH4zD6T7bcC7Y --- build.gradle.kts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index d8629c56..f21724dc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -151,6 +151,13 @@ subprojects { */ systemProperty("junit.jupiter.execution.timeout.default", "2m") systemProperty("junit.jupiter.execution.timeout.thread.mode.default", "SEPARATE_THREAD") + /* + * The timed-out thread's stack shows where a test waits, not who it waits for: the + * rare CI hang in SelectedStationMessageUiVisualRenderingTest blocks on a monitor + * that another thread holds. On a timeout JUnit prints all threads to the test's + * standard output, which lands in its XML report (the test-results artifact). + */ + systemProperty("junit.jupiter.execution.timeout.threaddump.enabled", "true") // The default short format prints only the first frame of each cause, which for a // timed-out test is the line it hung in but not the call that blocked there. testLogging {