CustomTabActivityTest#testTabReparenting* very flaky on some devices
Reported by
kra...@amazon.com,
May 7 2016
|
||
Issue descriptionVersion: Tip of master OS: Android (Lollipop+) What steps will reproduce the problem? (1) Run CustomTabActivityTest#testTabReparenting* on a Lollipop device with num_retries=0 What is the expected output? 100% C 77.083s Main ******************************************************************************** C 77.084s Main [==========] 1 test ran. C 77.084s Main [ PASSED ] 1 test. C 77.084s Main ******************************************************************************** What do you see instead? On some devices those tests have incredibly high failure rates. Sample run where all three failed: C 1300.294s Main [FAIL] org.chromium.chrome.browser.customtabs.CustomTabActivityTest#testTabReparentingBasic: C 1300.294s Main junit.framework.AssertionFailedError C 1300.294s Main at org.chromium.chrome.browser.customtabs.CustomTabActivityTest.reparentAndVerifyTab(CustomTabActivityTest.java:1241) C 1300.295s Main at org.chromium.chrome.browser.customtabs.CustomTabActivityTest.testTabReparentingBasic(CustomTabActivityTest.java:447) C 1300.295s Main at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214) C 1300.295s Main at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199) C 1300.295s Main at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:192) C 1300.295s Main at org.chromium.chrome.test.ChromeActivityTestCaseBase.runTest(ChromeActivityTestCaseBase.java:793) C 1300.295s Main at org.chromium.base.test.BaseTestResult.runParameterized(BaseTestResult.java:161) C 1300.295s Main at org.chromium.base.test.BaseTestResult.run(BaseTestResult.java:124) C 1300.295s Main at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191) C 1300.295s Main at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176) C 1300.296s Main at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:557) C 1300.296s Main at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1874) C 1300.296s Main C 1300.296s Main [FAIL] org.chromium.chrome.browser.customtabs.CustomTabActivityTest#testTabReparentingInfoBar: C 1300.296s Main junit.framework.AssertionFailedError C 1300.296s Main at org.chromium.chrome.browser.customtabs.CustomTabActivityTest.reparentAndVerifyTab(CustomTabActivityTest.java:1241) C 1300.296s Main at org.chromium.chrome.browser.customtabs.CustomTabActivityTest.testTabReparentingInfoBar(CustomTabActivityTest.java:468) C 1300.296s Main at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214) C 1300.296s Main at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199) C 1300.297s Main at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:192) C 1300.297s Main at org.chromium.chrome.test.ChromeActivityTestCaseBase.runTest(ChromeActivityTestCaseBase.java:793) C 1300.297s Main at org.chromium.base.test.BaseTestResult.runParameterized(BaseTestResult.java:161) C 1300.297s Main at org.chromium.base.test.BaseTestResult.run(BaseTestResult.java:124) C 1300.297s Main at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191) C 1300.297s Main at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176) C 1300.297s Main at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:557) C 1300.297s Main at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1874) C 1300.297s Main C 1300.297s Main [FAIL] org.chromium.chrome.browser.customtabs.CustomTabActivityTest#testTabReparentingSelectPopup: C 1300.297s Main junit.framework.AssertionFailedError C 1300.297s Main at org.chromium.chrome.browser.customtabs.CustomTabActivityTest.reparentAndVerifyTab(CustomTabActivityTest.java:1241) C 1300.298s Main at org.chromium.chrome.browser.customtabs.CustomTabActivityTest.testTabReparentingSelectPopup(CustomTabActivityTest.java:510) C 1300.298s Main at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214) C 1300.298s Main at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199) C 1300.298s Main at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:192) C 1300.298s Main at org.chromium.chrome.test.ChromeActivityTestCaseBase.runTest(ChromeActivityTestCaseBase.java:793) C 1300.298s Main at org.chromium.base.test.BaseTestResult.runParameterized(BaseTestResult.java:161) C 1300.298s Main at org.chromium.base.test.BaseTestResult.run(BaseTestResult.java:124) C 1300.298s Main at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191) C 1300.298s Main at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176) C 1300.298s Main at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:557) C 1300.298s Main at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1874) Please use labels and text to provide additional information. Line numbers might not match current tip of master (It's the "assertTrue(monitor.getLastActivity() instanceof ChromeActivity);" check) Current line: at org.chromium.chrome.browser.customtabs.CustomTabActivityTest.reparentAndVerifyTab(CustomTabActivityTest.java:1267)
,
May 10 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c3be22bfd9c16f9b6ca288d9737a1df5dde2ee0b commit c3be22bfd9c16f9b6ca288d9737a1df5dde2ee0b Author: kraush <kraush@amazon.com> Date: Tue May 10 15:24:22 2016 Use waitForActivity in CustomTabActivityTest CustomTabActivityTest#testTabReparenting* was assuming that checkMonitorHit would also mean that getLastActivity() is guaranteed to return an Activity. Since that assumption was incorrect, this change gets the logic in line with the other CustomTabActivityTest monitors and changes it to use waitForActivityWithTimeout instead. The CriteriaHelper timeout is used to keep the timeout identical to how it was before. BUG= 610091 Review-Url: https://codereview.chromium.org/1950983008 Cr-Commit-Position: refs/heads/master@{#392611} [modify] https://crrev.com/c3be22bfd9c16f9b6ca288d9737a1df5dde2ee0b/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java
,
Feb 2 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by kra...@amazon.com
, May 7 2016