Commit fcbf5784 authored by Donn Denman's avatar Donn Denman Committed by Commit Bot

[TTS] Workaround for flaky test suite CSM Test

The whole ContextualSearchManagerTest has been disabled due to flakiness
involving the focus moving into the Omnibox.

This CL implements a workaround by removing a delay after loading the
test page, which should not be needed anyway.

BUG=1058362

Change-Id: Ia4d7e5a65d36ec4c4c32d4b4e0eec2c8225e07af
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2131347Reviewed-by: default avatarJinsuk Kim <jinsukkim@chromium.org>
Commit-Queue: Donn Denman <donnd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#755332}
parent 4e75cf2d
...@@ -124,11 +124,6 @@ import java.util.concurrent.TimeoutException; ...@@ -124,11 +124,6 @@ import java.util.concurrent.TimeoutException;
"disable-features=" + ChromeFeatureList.CONTEXTUAL_SEARCH_ML_TAP_SUPPRESSION}) "disable-features=" + ChromeFeatureList.CONTEXTUAL_SEARCH_ML_TAP_SUPPRESSION})
@Restriction(RESTRICTION_TYPE_NON_LOW_END_DEVICE) @Restriction(RESTRICTION_TYPE_NON_LOW_END_DEVICE)
@RetryOnFailure @RetryOnFailure
//
// NOTE -- THIS WHOLE TEST CLASS IS TEMPORARILY DISABLED:
//
@DisabledTest(message = "See https://crbug.com/1058362")
//
public class ContextualSearchManagerTest { public class ContextualSearchManagerTest {
@Rule @Rule
public ChromeActivityTestRule<ChromeActivity> mActivityTestRule = public ChromeActivityTestRule<ChromeActivity> mActivityTestRule =
...@@ -145,8 +140,6 @@ public class ContextualSearchManagerTest { ...@@ -145,8 +140,6 @@ public class ContextualSearchManagerTest {
private static final String LOW_PRIORITY_SEARCH_ENDPOINT = "/s?"; private static final String LOW_PRIORITY_SEARCH_ENDPOINT = "/s?";
private static final String LOW_PRIORITY_INVALID_SEARCH_ENDPOINT = "/s/invalid"; private static final String LOW_PRIORITY_INVALID_SEARCH_ENDPOINT = "/s/invalid";
private static final String CONTEXTUAL_SEARCH_PREFETCH_PARAM = "&pf=c"; private static final String CONTEXTUAL_SEARCH_PREFETCH_PARAM = "&pf=c";
// The number of ms to delay startup for all tests.
private static final int ACTIVITY_STARTUP_DELAY_MS = 1000;
private ActivityMonitor mActivityMonitor; private ActivityMonitor mActivityMonitor;
private ContextualSearchFakeServer mFakeServer; private ContextualSearchFakeServer mFakeServer;
...@@ -214,10 +207,6 @@ public class ContextualSearchManagerTest { ...@@ -214,10 +207,6 @@ public class ContextualSearchManagerTest {
}); });
mActivityTestRule.startMainActivityWithURL(mTestServer.getURL(TEST_PAGE)); mActivityTestRule.startMainActivityWithURL(mTestServer.getURL(TEST_PAGE));
// There's a problem with immediate startup that causes flakes due to the page not being
// ready, so specify a startup-delay of 1000 for legacy behavior. See crbug.com/635661.
// TODO(donnd): find a better way to wait for page-ready, or at least reduce the delay!
Thread.sleep(ACTIVITY_STARTUP_DELAY_MS);
mManager = mActivityTestRule.getActivity().getContextualSearchManager(); mManager = mActivityTestRule.getActivity().getContextualSearchManager();
Assert.assertNotNull(mManager); Assert.assertNotNull(mManager);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment