summaryrefslogtreecommitdiffstats
path: root/quickstep/tests
diff options
context:
space:
mode:
authorvadimt <vadimt@google.com>2019-02-07 16:04:47 -0800
committervadimt <vadimt@google.com>2019-02-11 10:52:31 -0800
commitd4090431f50fcfb0a9bf7676263d65d9541426ac (patch)
tree699fc0a945cafb328e6716054adc54930246c8cc /quickstep/tests
parent28616560842608808c7a321278a931cef5f13ac1 (diff)
downloadandroid_packages_apps_Trebuchet-d4090431f50fcfb0a9bf7676263d65d9541426ac.tar.gz
android_packages_apps_Trebuchet-d4090431f50fcfb0a9bf7676263d65d9541426ac.tar.bz2
android_packages_apps_Trebuchet-d4090431f50fcfb0a9bf7676263d65d9541426ac.zip
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
Diffstat (limited to 'quickstep/tests')
-rw-r--r--quickstep/tests/src/com/android/quickstep/QuickStepOnOffRule.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/quickstep/tests/src/com/android/quickstep/QuickStepOnOffRule.java b/quickstep/tests/src/com/android/quickstep/QuickStepOnOffRule.java
index b801b4f01..72740909d 100644
--- a/quickstep/tests/src/com/android/quickstep/QuickStepOnOffRule.java
+++ b/quickstep/tests/src/com/android/quickstep/QuickStepOnOffRule.java
@@ -90,11 +90,16 @@ public class QuickStepOnOffRule implements TestRule {
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 {