Don't look for ANR dialog if the device doesn't support it
On some devices, error dialogs aren't supposed. Skip the 'wait for the app' test on those devices. Also skip looking for ANR dialog on the 'close app' test. Also, increase the timeout for waiting for the activity to launch and bind. When run on auto_md cf remote target, this is taking > 5 seconds to launch and connect. So it used to fail with the following message when the timeout was equal to 5 seconds: STACKTRACE: junit.framework.AssertionFailedError: UnresponsiveGestureMonitorActivity failed to call 'provideActivityInfo' at junit.framework.Assert.fail(Assert.java:50) at android.testing.PollingCheck.check(PollingCheck.java:73) at com.android.test.input.AnrTest.startUnresponsiveActivity(AnrTest.kt:235) at com.android.test.input.AnrTest.setUp(AnrTest.kt:132) And even with the multiplied timeout, the test used to fail, so increase the timeout to 10 seconds at the same time. When the ANR dialog is skipped, we need to ensure that we wait for "exit reasons" for a long time, because we are no longer waiting for the ANR dialog to appear. To run the test on auto cf md: $ lunch cf_x86_64_only_auto_md-trunk_staging-userdebug $ acloud create --local-image --boot-timeout 1000 $ atest AnrTest Flag: TEST_ONLY Bug: 339924248 Test: atest AnrTest Change-Id: I031361e48c8bcdeac7489555d1c12df1a956a982
Loading
Please register or sign in to comment