Improve interpreter logging
(this also fixes a small bug where the line numbers reported in InterpretExceptions were wrong in TrackRecordTest by finding the method from the stack trace that is actually annotated with @Test) This will help determining why testMultiplePoll is flaky. Presumably it's just the time being slightly too long because the device is loaded, but with this logs will tell. Sample output before (redacted for readability) InterpretException: java.lang.AssertionError: Expected value to be true. at TrackRecordTest.testMultiplePoll:thread1(TrackRecordTest.kt:267) ... Caused by: java.lang.AssertionError: Expected value to be true. ... Sample output after InterpretException: Failure: poll(2, 2) = 18 time 6..9 at TrackRecordTest.testMultiplePoll:thread1(TrackRecordTest.kt:267) ... Caused by: java.lang.AssertionError: 41 not in 240..360 ... Test: android.net.testutils.TrackRecordTest#testMultiplePoll (which is the flaky test) Test: NetworkStackTests Change-Id: I67c94ca7e5a7b2cd351c8f236b606c46cf05f2e3
Loading
Please register or sign in to comment