For #26335: Disable tests for the number of inflations.
These fail in Firebase with different values making the test intermittent.
This commit is contained in:
parent
1f562fe927
commit
edff593ee6
|
@ -6,7 +6,6 @@ package org.mozilla.fenix.perf
|
|||
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.LinearLayout
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.view.children
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
|
@ -16,7 +15,6 @@ import org.junit.Assert.assertEquals
|
|||
import org.junit.Assert.assertTrue
|
||||
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
|
||||
|
||||
|
@ -116,21 +114,24 @@ class StartupExcessiveResourceUseTest {
|
|||
val actualSuppresionCount = activityTestRule.activity.components.strictMode.suppressionCount.get().toInt()
|
||||
val actualRunBlocking = RunBlockingCounter.count.get()
|
||||
|
||||
val rootView = activityTestRule.activity.findViewById<LinearLayout>(R.id.rootContainer)
|
||||
val actualRecyclerViewConstraintLayoutChildren = countRecyclerViewConstraintLayoutChildren(rootView, null)
|
||||
|
||||
val actualNumberOfInflations = InflationCounter.inflationCount.get()
|
||||
|
||||
assertEquals(failureMsgStrictMode, EXPECTED_SUPPRESSION_COUNT, actualSuppresionCount)
|
||||
assertTrue(failureMsgRunBlocking + "actual: $actualRunBlocking", actualRunBlocking in EXPECTED_RUNBLOCKING_RANGE)
|
||||
assertTrue(
|
||||
failureMsgRecyclerViewConstraintLayoutChildren + "actual: $actualRecyclerViewConstraintLayoutChildren",
|
||||
actualRecyclerViewConstraintLayoutChildren in EXPECTED_RECYCLER_VIEW_CONSTRAINT_LAYOUT_CHILDREN,
|
||||
)
|
||||
assertTrue(
|
||||
failureMsgNumberOfInflation + "actual: $actualNumberOfInflations",
|
||||
actualNumberOfInflations in EXPECTED_NUMBER_OF_INFLATION,
|
||||
)
|
||||
|
||||
// This below asserts fail in Firebase with different values for
|
||||
// "actualRecyclerViewConstraintLayoutChildren" or "actualNumberOfInflations"
|
||||
// See https://github.com/mozilla-mobile/fenix/pull/26512 and https://github.com/mozilla-mobile/fenix/issues/25142
|
||||
//
|
||||
// val rootView = activityTestRule.activity.findViewById<LinearLayout>(R.id.rootContainer)
|
||||
// val actualRecyclerViewConstraintLayoutChildren = countRecyclerViewConstraintLayoutChildren(rootView, null)
|
||||
// assertTrue(
|
||||
// failureMsgRecyclerViewConstraintLayoutChildren + "actual: $actualRecyclerViewConstraintLayoutChildren",
|
||||
// actualRecyclerViewConstraintLayoutChildren in EXPECTED_RECYCLER_VIEW_CONSTRAINT_LAYOUT_CHILDREN,
|
||||
// )
|
||||
// val actualNumberOfInflations = InflationCounter.inflationCount.get()
|
||||
// assertTrue(
|
||||
// failureMsgNumberOfInflation + "actual: $actualNumberOfInflations",
|
||||
// actualNumberOfInflations in EXPECTED_NUMBER_OF_INFLATION,
|
||||
// )
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue