Skip to content

Commit

Permalink
For mozilla-mobile#21138: re-enable excessive resource use test.
Browse files Browse the repository at this point in the history
This test wasn't running in CI
mozilla-mobile#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.
  • Loading branch information
mcomella authored and mergify[bot] committed Sep 7, 2021
1 parent 4d3e4bb commit 0014f94
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,16 @@ 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
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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 0014f94

Please sign in to comment.