New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 660312 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

ImeTest#testPasteLongText is flaky on low end devices

Project Member Reported by yabinh@chromium.org, Oct 28 2016

Issue description

ImeTest#testPasteLongText is flaky on low end devices, though not flaky on trybot so far.

Device: Android One, Android 5.1.1
Failure rate: 5/20

C   24.111s Main  [FAIL] org.chromium.content.browser.input.ImeTest#testPasteLongText with {--enable-features=ImeThread}:
C   24.111s Main  junit.framework.AssertionFailedError: Criteria not met in allotted time.
C   24.112s Main  	at org.chromium.content.browser.test.util.CriteriaHelper.pollInstrumentationThread(CriteriaHelper.java:74)
C   24.112s Main  	at org.chromium.content.browser.test.util.CriteriaHelper.pollUiThread(CriteriaHelper.java:112)
C   24.112s Main  	at org.chromium.content.browser.test.util.CriteriaHelper.pollUiThread(CriteriaHelper.java:133)
C   24.112s Main  	at org.chromium.content.browser.input.ImeTest.waitAndVerifyUpdateSelection(ImeTest.java:1654)
C   24.112s Main  	at org.chromium.content.browser.input.ImeTest.testPasteLongText(ImeTest.java:829)
C   24.112s Main  	at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
C   24.112s Main  	at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
C   24.112s Main  	at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:192)
C   24.112s Main  	at org.chromium.content_shell_apk.ContentShellTestBase.runTest(ContentShellTestBase.java:233)
C   24.112s Main  	at org.chromium.base.test.BaseTestResult.runParameterized(BaseTestResult.java:161)
C   24.112s Main  	at org.chromium.base.test.BaseTestResult.run(BaseTestResult.java:124)
C   24.112s Main  	at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191)
C   24.112s Main  	at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176)
C   24.113s Main  	at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:555)
C   24.113s Main  	at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1853)


After copying very long text on a low end device, it takes a long time to update the selection. However, the DEFAULT_MAX_TIME_TO_POLL of CriteriaHelper is only 3 seconds, which is not long enough in this case.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 28 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0fe41db3e86f4046f07ac6d2e3f0598546a50d65

commit 0fe41db3e86f4046f07ac6d2e3f0598546a50d65
Author: yabinh <yabinh@chromium.org>
Date: Fri Oct 28 12:46:07 2016

Fix flaky ImeTest#testPasteLongText

ImeTest#testPasteLongText is flaky on low end devices because it takes
too much time to copy very long text to the clipboard. We can set the
content of clipboard directly to avoid flakiness.

BUG= 660312 

Review-Url: https://codereview.chromium.org/2456273002
Cr-Commit-Position: refs/heads/master@{#428346}

[modify] https://crrev.com/0fe41db3e86f4046f07ac6d2e3f0598546a50d65/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java

Comment 2 by yabinh@chromium.org, Oct 31 2016

Status: Fixed (was: Assigned)

Comment 3 by yabinh@chromium.org, Dec 22 2016

Status: Started (was: Fixed)
This test is flaky again, for the same reason. The failure rate on Nexus 9 is ~3/10.

In normal cases, it takes ~2 seconds to update selection after pasting. But sometimes it may takes more than 3 seconds (DEFAULT_MAX_TIME_TO_POLL = 3 seconds).

Since IME thread is fully landed, we don't need this test anymore.

Comment 4 by yabinh@chromium.org, Dec 22 2016

Typo: should be "The failure rate on Nexus [5] is ~3/10"
Project Member

Comment 5 by bugdroid1@chromium.org, Dec 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c4f371e1758fd6c34827e571064b93f319ae312e

commit c4f371e1758fd6c34827e571064b93f319ae312e
Author: yabinh <yabinh@chromium.org>
Date: Thu Dec 22 07:49:04 2016

Remove obsolete and flaky ImeTest#testPasteLongText

The purpose of ImeTest#testPasteLongText is to show that Chrome can crash
if IME thread is not enabled. Since IME thread is landed, we don't need
the test any more. Besides, the test is flaky on low end device because
it takes too much time to paste long text.

BUG= 660312 

Review-Url: https://codereview.chromium.org/2594333002
Cr-Commit-Position: refs/heads/master@{#440357}

[modify] https://crrev.com/c4f371e1758fd6c34827e571064b93f319ae312e/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java

Comment 6 by yabinh@chromium.org, Dec 22 2016

Status: Fixed (was: Started)

Sign in to add a comment