Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import java.io.File
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertNotNull
import org.junit.After
import org.junit.runner.RunWith
import org.mockito.kotlin.any
import org.mockito.kotlin.anyOrNull
Expand Down Expand Up @@ -163,11 +162,6 @@ class AnrV2IntegrationTest : ApplicationExitIntegrationTestBase<AnrV2Hint>() {
assertEquals("/apex/com.android.runtime/lib64/bionic/libc.so", image.codeFile)
}

@After
Comment thread
runningcode marked this conversation as resolved.
fun cleanup() {
fixture.options.cacheDirPath?.let { File(it).deleteRecursively() }
}

@Test
fun `when latest ANR has foreground importance, sets abnormal mechanism to anr_foreground`() {
val integration =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import io.sentry.protocol.SentryId
import io.sentry.test.ImmediateExecutorService
import java.io.File
import java.util.zip.GZIPInputStream
import kotlin.test.AfterTest
import kotlin.test.BeforeTest
import kotlin.test.Test
import org.junit.Rule
Expand Down Expand Up @@ -63,6 +62,9 @@ class ApplicationExitInfoCrossIntegrationTest {
setLogger(logger)
isDebug = true
cacheDirPath = dir.absolutePath
// Nothing ever releases these latches here, so every wait would run to its timeout.
flushTimeoutMillis = 0L
sessionFlushTimeoutMillis = 0L
executorService = ImmediateExecutorService()
setEnvelopeDiskCache(EnvelopeCache.create(this))
addInAppInclude("io.sentry.samples")
Expand Down Expand Up @@ -151,11 +153,6 @@ class ApplicationExitInfoCrossIntegrationTest {
fixture.init(ApplicationProvider.getApplicationContext())
}

@AfterTest
fun `tear down`() {
tmpDir.root.deleteRecursively()
}

@Test
fun `memory limiter and anr integrations each capture only their own exits from shared history`() {
val memoryLimiterTimestamp = System.currentTimeMillis() - 1_000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import io.sentry.test.ImmediateExecutorService
import io.sentry.transport.CurrentDateProvider
import io.sentry.util.HintUtils
import java.io.File
import kotlin.test.AfterTest
import kotlin.test.BeforeTest
import kotlin.test.Test
import kotlin.test.assertEquals
Expand Down Expand Up @@ -78,6 +77,9 @@ class MemoryLimiterIntegrationTest {
setLogger(this@Fixture.logger)
isDebug = true
cacheDirPath = dir?.newFolder()?.absolutePath
// Nothing ever releases these latches here, so every wait would run to its timeout.
flushTimeoutMillis = 0L
sessionFlushTimeoutMillis = 0L
executorService = if (useImmediateExecutorService) ImmediateExecutorService() else mock()
isMemoryLimiterEnabled = memoryLimiterEnabled
isReportHistoricalMemoryLimiterExits = reportHistoricalMemoryLimiterExits
Expand Down Expand Up @@ -134,11 +136,6 @@ class MemoryLimiterIntegrationTest {
fixture.init(context)
}

@AfterTest
fun `tear down`() {
fixture.options.cacheDirPath?.let { File(it).deleteRecursively() }
}

@Test
fun `does not process MemoryLimiter exits when integration is disabled`() {
val integration =
Expand Down
Loading