Don't init glean in unit tests (#13100)
parent
df7aafc2df
commit
c9f8986d2b
|
@ -12,8 +12,8 @@ import android.util.Log.INFO
|
||||||
import androidx.annotation.CallSuper
|
import androidx.annotation.CallSuper
|
||||||
import androidx.appcompat.app.AppCompatDelegate
|
import androidx.appcompat.app.AppCompatDelegate
|
||||||
import androidx.core.content.getSystemService
|
import androidx.core.content.getSystemService
|
||||||
import androidx.work.Configuration.Provider
|
|
||||||
import androidx.work.Configuration.Builder
|
import androidx.work.Configuration.Builder
|
||||||
|
import androidx.work.Configuration.Provider
|
||||||
import kotlinx.coroutines.Deferred
|
import kotlinx.coroutines.Deferred
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.GlobalScope
|
import kotlinx.coroutines.GlobalScope
|
||||||
|
@ -93,7 +93,7 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
|
||||||
setupInMainProcessOnly()
|
setupInMainProcessOnly()
|
||||||
}
|
}
|
||||||
|
|
||||||
protected fun initializeGlean() {
|
protected open fun initializeGlean() {
|
||||||
val telemetryEnabled = settings().isTelemetryEnabled
|
val telemetryEnabled = settings().isTelemetryEnabled
|
||||||
|
|
||||||
logger.debug("Initializing Glean (uploadEnabled=$telemetryEnabled, isFennec=${Config.channel.isFennec})")
|
logger.debug("Initializing Glean (uploadEnabled=$telemetryEnabled, isFennec=${Config.channel.isFennec})")
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
package org.mozilla.fenix.helpers
|
package org.mozilla.fenix.helpers
|
||||||
|
|
||||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
|
||||||
import org.mozilla.fenix.FenixApplication
|
import org.mozilla.fenix.FenixApplication
|
||||||
import org.mozilla.fenix.components.TestComponents
|
import org.mozilla.fenix.components.TestComponents
|
||||||
|
|
||||||
|
@ -17,8 +16,9 @@ class FenixRobolectricTestApplication : FenixApplication() {
|
||||||
|
|
||||||
override val components = TestComponents(this)
|
override val components = TestComponents(this)
|
||||||
|
|
||||||
|
override fun initializeGlean() = Unit
|
||||||
|
|
||||||
override fun setupInAllProcesses() = Unit
|
override fun setupInAllProcesses() = Unit
|
||||||
|
|
||||||
@ExperimentalCoroutinesApi
|
|
||||||
override fun setupInMainProcessOnly() = Unit
|
override fun setupInMainProcessOnly() = Unit
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue