From cb82bf8705a97acc264253d32f1aeb254bfc17d8 Mon Sep 17 00:00:00 2001 From: Yukun Yang Date: Tue, 22 Nov 2022 13:59:09 +0800 Subject: [PATCH] Fix flakiness of testNativeCrash TestNativeCrash is not always able to get the tombstone of the crashed native app. This is because the tombstone timestamp can be more than 5000ms before the ApplicationExitInfo, causing them to not match. This patch increases timestamp difference to ensure that the tombstone always matches in Low-end smartphone. Bug: 260043829 Test: atest CtsAppExitTestCases:ActivityManagerAppExitInfoTest Change-Id: I7d6094bc791430a930c1904eab03096aae4b8822 --- .../core/java/com/android/server/os/NativeTombstoneManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/os/NativeTombstoneManager.java b/services/core/java/com/android/server/os/NativeTombstoneManager.java index 45192b7bcdbe6..88f70cf21959a 100644 --- a/services/core/java/com/android/server/os/NativeTombstoneManager.java +++ b/services/core/java/com/android/server/os/NativeTombstoneManager.java @@ -363,7 +363,7 @@ public final class NativeTombstoneManager { return false; } - if (Math.abs(exitInfo.getTimestamp() - mTimestampMs) > 5000) { + if (Math.abs(exitInfo.getTimestamp() - mTimestampMs) > 10000) { return false; }