commit | d4090431f50fcfb0a9bf7676263d65d9541426ac | [log] [tgz] |
---|---|---|
author | vadimt <vadimt@google.com> | Thu Feb 07 16:04:47 2019 -0800 |
committer | vadimt <vadimt@google.com> | Mon Feb 11 10:52:31 2019 -0800 |
tree | 699fc0a945cafb328e6716054adc54930246c8cc | |
parent | 28616560842608808c7a321278a931cef5f13ac1 [diff] |
Quick plug to solve flakiness caused by switching QS on/off Will be followed by a better fix. Test: Stress-testing with TAPL Change-Id: Ie0ca1e9b7c6c9a885c752df5f76903898615e8fb
diff --git a/quickstep/tests/src/com/android/quickstep/QuickStepOnOffRule.java b/quickstep/tests/src/com/android/quickstep/QuickStepOnOffRule.java index b801b4f..7274090 100644 --- a/quickstep/tests/src/com/android/quickstep/QuickStepOnOffRule.java +++ b/quickstep/tests/src/com/android/quickstep/QuickStepOnOffRule.java
@@ -90,11 +90,16 @@ base.evaluate(); } - private void overrideSwipeUpEnabled(Boolean swipeUpEnabledOverride) { + private void overrideSwipeUpEnabled(Boolean swipeUpEnabledOverride) + throws Throwable { mLauncher.overrideSwipeUpEnabled(swipeUpEnabledOverride); mMainThreadExecutor.execute(() -> OverviewInteractionState.INSTANCE.get( InstrumentationRegistry.getInstrumentation().getTargetContext()). notifySwipeUpSettingChanged(mLauncher.isSwipeUpEnabled())); + // TODO(b/124236673): avoid using sleep(). + mLauncher.getDevice().waitForIdle(); + Thread.sleep(2000); + mLauncher.getDevice().waitForIdle(); } }; } else {
diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java index e20a89e..b050993 100644 --- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
@@ -402,7 +402,7 @@ } @NonNull - UiDevice getDevice() { + public UiDevice getDevice() { return mDevice; }