2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-19 09:25:34 +00:00

[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.
This commit is contained in:
Michael Comella 2021-09-03 14:43:46 -07:00 committed by mergify[bot]
parent 52be831336
commit d4c2608670

View File

@ -14,7 +14,6 @@ import androidx.recyclerview.widget.RecyclerView
import androidx.test.platform.app.InstrumentationRegistry import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice import androidx.test.uiautomator.UiDevice
import org.junit.Assert.assertEquals import org.junit.Assert.assertEquals
import org.junit.Ignore
import org.junit.Rule import org.junit.Rule
import org.junit.Test import org.junit.Test
import org.mozilla.fenix.R import org.mozilla.fenix.R
@ -22,9 +21,9 @@ import org.mozilla.fenix.ext.components
import org.mozilla.fenix.helpers.HomeActivityTestRule import org.mozilla.fenix.helpers.HomeActivityTestRule
// BEFORE INCREASING THESE VALUES, PLEASE CONSULT WITH THE PERF TEAM. // BEFORE INCREASING THESE VALUES, PLEASE CONSULT WITH THE PERF TEAM.
private const val EXPECTED_SUPPRESSION_COUNT = 11 private const val EXPECTED_SUPPRESSION_COUNT = 19
private const val EXPECTED_RUNBLOCKING_COUNT = 3 private const val EXPECTED_RUNBLOCKING_COUNT = 0
private const val EXPECTED_COMPONENT_INIT_COUNT = 42 private const val EXPECTED_COMPONENT_INIT_COUNT = 50
private const val EXPECTED_VIEW_HIERARCHY_DEPTH = 12 private const val EXPECTED_VIEW_HIERARCHY_DEPTH = 12
private const val EXPECTED_RECYCLER_VIEW_CONSTRAINT_LAYOUT_CHILDREN = 4 private const val EXPECTED_RECYCLER_VIEW_CONSTRAINT_LAYOUT_CHILDREN = 4
private const val EXPECTED_NUMBER_OF_INFLATION = 12 private const val EXPECTED_NUMBER_OF_INFLATION = 12
@ -83,7 +82,6 @@ class StartupExcessiveResourceUseTest {
private val uiDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()) private val uiDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
@Ignore("See: https://github.com/mozilla-mobile/fenix/pull/20841#issuecomment-898630241c")
@Test @Test
fun verifyRunBlockingAndStrictModeSuppresionCount() { fun verifyRunBlockingAndStrictModeSuppresionCount() {
uiDevice.waitForIdle() // wait for async UI to load. uiDevice.waitForIdle() // wait for async UI to load.