Adjust the freezer debounce timeout test This lowers the threshold for the freezer debounce timeout. The new value is used by Wear; testing by Wear demonstrates that the value introduces no unexpected behavior. Flag: EXEMPT bug-fix Bug: 409219690 Test: atest * CtsAppExitTestCases Change-Id: If8560498d3fa334d5d76e8ffcf70e493e82894df
diff --git a/tests/app/AppExitTest/src/android/app/cts/ActivityManagerAppExitInfoTest.java b/tests/app/AppExitTest/src/android/app/cts/ActivityManagerAppExitInfoTest.java index d7d73f0..f124adf 100644 --- a/tests/app/AppExitTest/src/android/app/cts/ActivityManagerAppExitInfoTest.java +++ b/tests/app/AppExitTest/src/android/app/cts/ActivityManagerAppExitInfoTest.java
@@ -131,7 +131,9 @@ private static final long HEARTBEAT_INTERVAL = 1000; private static final long HEARTBEAT_FREEZER_LONG = 30000; private static final long HEARTBEAT_FREEZER_SHORT = 5000; - private static final long FREEZER_TIMEOUT_FLOOR = 10000; + // Freezer debounce values that are too low may lead to unexpected behavior. The value here + // is the lowest value that has been validated. + private static final long FREEZER_TIMEOUT_FLOOR = 5000; private static final String EXIT_ACTION = "com.android.cts.launchertests.simpleapp.EXIT_ACTION"; @@ -1462,7 +1464,9 @@ Matcher matcher = pattern.matcher(output); assertTrue(matcher.find()); final long timeout = Long.parseLong(matcher.group(1)); - assertTrue(timeout >= FREEZER_TIMEOUT_FLOOR); + assertTrue("Configured freezer debounce timeout " + timeout + + " is below " + FREEZER_TIMEOUT_FLOOR, + timeout >= FREEZER_TIMEOUT_FLOOR); } @Test