From 117da80c79c8f23a63bea188254c328f7b957a35 Mon Sep 17 00:00:00 2001 From: Michael Comella Date: Fri, 3 Sep 2021 14:43:46 -0700 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/21138: re-enable excessive resource use test. This test wasn't running in CI https://github.com/mozilla-mobile/fenix/issues/20386 so we changed the CI configuration so that it will. However, the test was then failing so this is the revision that unignores the test. I wonder if componentInit count is useful - it seems like it'd cause more false positives than not - but I figure we can leave it in and see how it goes. --- .../org/mozilla/fenix/perf/StartupExcessiveResourceUseTest.kt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/perf/StartupExcessiveResourceUseTest.kt b/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/perf/StartupExcessiveResourceUseTest.kt index 5cc9f0e81b15..65f23a811ad4 100644 --- a/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/perf/StartupExcessiveResourceUseTest.kt +++ b/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/perf/StartupExcessiveResourceUseTest.kt @@ -14,7 +14,6 @@ import androidx.recyclerview.widget.RecyclerView import androidx.test.platform.app.InstrumentationRegistry import androidx.test.uiautomator.UiDevice import org.junit.Assert.assertEquals -import org.junit.Ignore import org.junit.Rule import org.junit.Test import org.mozilla.fenix.R @@ -22,9 +21,9 @@ import org.mozilla.fenix.ext.components import org.mozilla.fenix.helpers.HomeActivityTestRule // BEFORE INCREASING THESE VALUES, PLEASE CONSULT WITH THE PERF TEAM. -private const val EXPECTED_SUPPRESSION_COUNT = 11 -private const val EXPECTED_RUNBLOCKING_COUNT = 3 -private const val EXPECTED_COMPONENT_INIT_COUNT = 42 +private const val EXPECTED_SUPPRESSION_COUNT = 19 +private const val EXPECTED_RUNBLOCKING_COUNT = 0 +private const val EXPECTED_COMPONENT_INIT_COUNT = 50 private const val EXPECTED_VIEW_HIERARCHY_DEPTH = 12 private const val EXPECTED_RECYCLER_VIEW_CONSTRAINT_LAYOUT_CHILDREN = 4 private const val EXPECTED_NUMBER_OF_INFLATION = 12 @@ -83,7 +82,6 @@ class StartupExcessiveResourceUseTest { private val uiDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()) - @Ignore("See: https://github.com/mozilla-mobile/fenix/pull/20841#issuecomment-898630241c") @Test fun verifyRunBlockingAndStrictModeSuppresionCount() { uiDevice.waitForIdle() // wait for async UI to load. -- 2.11.4.GIT