Skip to content
Commit c034c721 authored by Junyu Lai's avatar Junyu Lai
Browse files

Make thread leak error message more readable

This change only outputs thread count differences instead of
listing all threads. Additionally, it ignores threads with 1
count, which effectively filter out threads created
by the test runner or other system components, such as
hwuiTask*, queued-work-looper, SurfaceSyncGroupTimer,
RenderThread, and Time-limited test.

Sample Output:
[1122/3060] android.net.connectivity.com.android.server.CSLocalAgentCreationTests#ThreadLeakMonitor: FAILED (1ms)

STACKTRACE:
java.lang.IllegalStateException: Unexpected thread changes: removed=[] added=[] updated=[TestAlarmManager=25,CSTestHandler=25]

Test: atest ConnectivityCoverageTests
      (with shouldThreadLeakFailTest set to true)
Bug: 310581973
Bug: 307693729
Change-Id: I085799ebbd69c29f833335684de208105302e012
parent 17f589cf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment