Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Applications
android-components
Commits
a1c339ba
Commit
a1c339ba
authored
Jul 10, 2019
by
travis79
Browse files
Remove duplicate WorkManager init from service-glean tests
parent
3d90f734
Changes
3
Hide whitespace changes
Inline
Side-by-side
components/service/glean/src/test/java/mozilla/components/service/glean/GleanTest.kt
View file @
a1c339ba
...
...
@@ -9,7 +9,6 @@ import androidx.lifecycle.Lifecycle
import
androidx.lifecycle.LifecycleOwner
import
androidx.lifecycle.LifecycleRegistry
import
androidx.test.core.app.ApplicationProvider
import
androidx.work.testing.WorkManagerTestInitHelper
import
kotlinx.coroutines.ExperimentalCoroutinesApi
import
kotlinx.coroutines.ObsoleteCoroutinesApi
import
kotlinx.coroutines.runBlocking
...
...
@@ -62,9 +61,6 @@ class GleanTest {
@Before
fun
setup
()
{
WorkManagerTestInitHelper
.
initializeTestWorkManager
(
ApplicationProvider
.
getApplicationContext
())
resetGlean
()
}
...
...
components/service/glean/src/test/java/mozilla/components/service/glean/debug/GleanDebugActivityTest.kt
View file @
a1c339ba
...
...
@@ -16,7 +16,6 @@ import org.junit.Before
import
org.robolectric.Robolectric
import
android.content.pm.ActivityInfo
import
android.content.pm.ResolveInfo
import
androidx.work.testing.WorkManagerTestInitHelper
import
mozilla.components.service.glean.private.BooleanMetricType
import
mozilla.components.service.glean.private.Lifetime
import
mozilla.components.service.glean.resetGlean
...
...
@@ -35,9 +34,6 @@ class GleanDebugActivityTest {
fun
setup
()
{
resetGlean
()
WorkManagerTestInitHelper
.
initializeTestWorkManager
(
ApplicationProvider
.
getApplicationContext
())
// This makes sure we have a "launch" intent in our package, otherwise
// it will fail looking for it in `GleanDebugActivityTest`.
val
pm
=
ApplicationProvider
.
getApplicationContext
<
Context
>().
packageManager
...
...
components/service/glean/src/test/java/mozilla/components/service/glean/storages/EventsStorageEngineTest.kt
View file @
a1c339ba
...
...
@@ -4,8 +4,6 @@
package
mozilla.components.service.glean.storages
import
android.os.SystemClock
import
androidx.test.core.app.ApplicationProvider
import
androidx.work.testing.WorkManagerTestInitHelper
import
mozilla.components.service.glean.Glean
import
mozilla.components.service.glean.checkPingSchema
import
mozilla.components.service.glean.error.ErrorRecording.ErrorType
...
...
@@ -55,9 +53,6 @@ class EventsStorageEngineTest {
resetGlean
()
assert
(
Glean
.
initialized
)
EventsStorageEngine
.
clearAllStores
()
// Initialize WorkManager using the WorkManagerTestInitHelper.
WorkManagerTestInitHelper
.
initializeTestWorkManager
(
ApplicationProvider
.
getApplicationContext
())
}
@Test
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment