From b000978aa3dc845b70f2de19fd9fbd7d67cf1dcf Mon Sep 17 00:00:00 2001 From: Francisco Prieto Date: Thu, 12 Sep 2024 14:38:48 -0300 Subject: [PATCH] Fix SigquitJniInterfaceTest (#1358) --- embrace-android-sdk/build.gradle.kts | 2 ++ .../android/embracesdk/ndk/jni/SigquitJniInterfaceTest.kt | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/embrace-android-sdk/build.gradle.kts b/embrace-android-sdk/build.gradle.kts index e9bef65352..693c95714f 100644 --- a/embrace-android-sdk/build.gradle.kts +++ b/embrace-android-sdk/build.gradle.kts @@ -91,6 +91,8 @@ dependencies { testImplementation(libs.protobuf.java) testImplementation(libs.protobuf.java.util) testImplementation(libs.kotlin.reflect) + + androidTestImplementation(project(":embrace-test-fakes")) } project.tasks.register("publishLocal") { dependsOn("publishMavenPublicationToMavenLocal") } diff --git a/embrace-android-sdk/src/androidTest/java/io/embrace/android/embracesdk/ndk/jni/SigquitJniInterfaceTest.kt b/embrace-android-sdk/src/androidTest/java/io/embrace/android/embracesdk/ndk/jni/SigquitJniInterfaceTest.kt index 7a8f92a524..09450911a3 100644 --- a/embrace-android-sdk/src/androidTest/java/io/embrace/android/embracesdk/ndk/jni/SigquitJniInterfaceTest.kt +++ b/embrace-android-sdk/src/androidTest/java/io/embrace/android/embracesdk/ndk/jni/SigquitJniInterfaceTest.kt @@ -1,5 +1,6 @@ package io.embrace.android.embracesdk.ndk.jni +import io.embrace.android.embracesdk.fakes.FakeSigquitDataSource import io.embrace.android.embracesdk.internal.anr.sigquit.EmbraceSigquitNdkDelegate import io.embrace.android.embracesdk.ndk.NativeTestSuite import org.junit.Assert.assertEquals @@ -16,7 +17,8 @@ internal class SigquitJniInterfaceTest : NativeTestSuite() { */ @Test fun installGoogleAnrHandlerTest() { - val result = sigquitNdkDelegate.installGoogleAnrHandler(1) + val fakeSigquitDataSource = FakeSigquitDataSource() + val result = sigquitNdkDelegate.installGoogleAnrHandler(1, fakeSigquitDataSource) assertEquals(0, result) } }