2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-03 23:15:31 +00:00

[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.
This commit is contained in:
Michael Comella 2021-09-15 14:15:11 -07:00 committed by mergify[bot]
parent e78754d598
commit 2dc9cfec20

View File

@ -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)