[fenix] Closes https://github.com/mozilla-mobile/fenix/issues/18102: remove intermittent failing App onCreate duration measurement test.

The test as it exists relies on the robolectric lifecycle, which is hard
to predict, so it doesn't seem worth fixing the test. Writing the test
any other way would require excessive mocking, which also seems
impractical.
pull/600/head
Michael Comella 3 years ago committed by mergify[bot]
parent e78754d598
commit 2dc9cfec20

@ -16,15 +16,12 @@ import mozilla.components.feature.addons.migration.DefaultSupportedAddonsChecker
import mozilla.components.service.glean.testing.GleanTestRule
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.mozilla.fenix.GleanMetrics.Addons
import org.mozilla.fenix.GleanMetrics.Metrics
import org.mozilla.fenix.GleanMetrics.PerfStartup
import org.mozilla.fenix.GleanMetrics.Preferences
import org.mozilla.fenix.GleanMetrics.SearchDefaultEngine
import org.mozilla.fenix.components.metrics.MozillaProductDetector
@ -51,14 +48,6 @@ class FenixApplicationTest {
browserStore = BrowserStore()
}
@Ignore("See https://github.com/mozilla-mobile/fenix/issues/18102")
@Test
fun `GIVEN onCreate is called THEN the duration is measured`() {
// application.onCreate is called before the test as part of test set up:
// https://robolectric.blogspot.com/2013/04/the-test-lifecycle-in-20.html
assertTrue(PerfStartup.applicationOnCreate.testHasValue())
}
@Test
fun `GIVEN there are unsupported addons installed WHEN subscribing for new add-ons checks THEN register for checks`() {
val checker = mockk<DefaultSupportedAddonsChecker>(relaxed = true)

Loading…
Cancel
Save