Closes #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:
parent
e6395bff97
commit
83bd2f2254
|
@ -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…
Reference in New Issue