From 2dc9cfec20c94adc036d86fdb47d2ebe205526e0 Mon Sep 17 00:00:00 2001 From: Michael Comella Date: Wed, 15 Sep 2021 14:15:11 -0700 Subject: [PATCH] [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. --- .../java/org/mozilla/fenix/FenixApplicationTest.kt | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/app/src/test/java/org/mozilla/fenix/FenixApplicationTest.kt b/app/src/test/java/org/mozilla/fenix/FenixApplicationTest.kt index 1eca1ec15..37c2fb332 100644 --- a/app/src/test/java/org/mozilla/fenix/FenixApplicationTest.kt +++ b/app/src/test/java/org/mozilla/fenix/FenixApplicationTest.kt @@ -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(relaxed = true)