[android] disable leak canary during instrumentation tests
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
package com.mapbox.mapboxsdk
|
||||
|
||||
import com.mapbox.mapboxsdk.testapp.MapboxApplication
|
||||
|
||||
class InstrumentationApplication : MapboxApplication() {
|
||||
override fun initializeLeakCanary(): Boolean {
|
||||
// do not initialize leak canary during instrumentation tests
|
||||
return true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.mapbox.mapboxsdk
|
||||
|
||||
import android.app.Application
|
||||
import android.content.Context
|
||||
import android.support.test.runner.AndroidJUnitRunner
|
||||
|
||||
class InstrumentationRunner : AndroidJUnitRunner() {
|
||||
override fun newApplication(cl: ClassLoader?, className: String?, context: Context?): Application {
|
||||
return super.newApplication(cl, InstrumentationApplication::class.java.name, context)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user