1
0
Fork 0

Don't init glean in unit tests (#13100)

master
Tiger Oakes 2020-08-04 11:18:52 -07:00 committed by GitHub
parent df7aafc2df
commit c9f8986d2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

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

View File

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