Round 3: Fix flakiness of testNativeCrash

Round 2: ag/15616233
Round 1: aosp/1702009

Even with increased timeouts, testNativeCrash is not always able to get
the tombstone of the crashed native app. This is because the tombstone
timestamp can be more than 1000ms before the ApplicationExitInfo,
causing them to not match. See b/191798394 for more details.

This CL increases the maximum timestamp difference to ensure that the
tombstone (almost?) always matches. Tested on sc-tv-dev/adt3_gtv-userdebug.

Bug: 200242349
Bug: 192299487
Test: atest android.app.cts.ActivityManagerAppExitInfoTest
Change-Id: Ideeb93dbcb40ce9d564f159fe1f7574554c09a40
This commit is contained in:
Yan Han
2021-09-15 15:18:22 +02:00
parent db885833e7
commit f4994987fb

View File

@@ -356,7 +356,7 @@ public final class NativeTombstoneManager {
return false;
}
if (Math.abs(exitInfo.getTimestamp() - mTimestampMs) > 1000) {
if (Math.abs(exitInfo.getTimestamp() - mTimestampMs) > 5000) {
return false;
}