From 8972dd0b6ebc295f9bb003e7bd31b70f70e58025 Mon Sep 17 00:00:00 2001 From: Joshua Tsuji Date: Thu, 19 Dec 2019 13:54:54 -0500 Subject: [PATCH] Decrease stiffness for one test to reduce flakes. Test: atest SystemUITests Change-Id: Id8a7ea26af7dfc0f15cf961cd734d15eec5453f0 --- .../android/systemui/util/animation/PhysicsAnimatorTest.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/tests/src/com/android/systemui/util/animation/PhysicsAnimatorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/util/animation/PhysicsAnimatorTest.kt index a39fbc4c232e5..709a1a8135967 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/util/animation/PhysicsAnimatorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/util/animation/PhysicsAnimatorTest.kt @@ -280,7 +280,12 @@ class PhysicsAnimatorTest : SysuiTestCase() { // Spring TRANSLATION_X to 100f, with an update and end listener provided. animator - .spring(DynamicAnimation.TRANSLATION_X, 100f, springConfig) + .spring( + DynamicAnimation.TRANSLATION_X, + 100f, + // Use very low stiffness to ensure that all of the keyframes we're testing + // for are reported to the update listener. + springConfig.apply { stiffness = SpringForce.STIFFNESS_VERY_LOW }) .addUpdateListener(mockUpdateListener) .addEndListener(mockEndListener) .start()