Skip to content

Commit 23ad47f

Browse files
runningcodeclaude
andcommitted
test(android): Ignore doubleInitDoesNotWait until transaction profiling is dropped
The headless app start sent after the second init can take the transaction profiler from the afterRestart transaction. Transaction-based profiling is being dropped in #5094, so ignore the test until then instead of working around it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 5d64606 commit 23ad47f

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

  • sentry-android-integration-tests/sentry-uitest-android/src/androidTest/java/io/sentry/uitest/android

‎sentry-android-integration-tests/sentry-uitest-android/src/androidTest/java/io/sentry/uitest/android/SdkInitTests.kt‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package io.sentry.uitest.android
33
import androidx.lifecycle.Lifecycle
44
import androidx.test.core.app.launchActivity
55
import androidx.test.ext.junit.runners.AndroidJUnit4
6-
import androidx.test.platform.app.InstrumentationRegistry
76
import io.sentry.ProfilingTraceData
87
import io.sentry.Sentry
98
import io.sentry.SentryIntegrationPackageStorage
@@ -19,6 +18,7 @@ import kotlin.test.assertEquals
1918
import kotlin.test.assertTrue
2019
import leakcanary.LeakAssertions
2120
import leakcanary.LeakCanary
21+
import org.junit.Ignore
2222
import org.junit.runner.RunWith
2323
import shark.AndroidReferenceMatchers
2424
import shark.IgnoredReferenceMatcher
@@ -111,6 +111,10 @@ class SdkInitTests : BaseUiTest() {
111111
}
112112
}
113113

114+
// The headless app start sent after the second init can take the transaction profiler from
115+
// afterRestart. Re-enable without the profile assertion once transaction-based profiling is
116+
// dropped.
117+
@Ignore("https://github.com/getsentry/sentry-java/issues/5094")
114118
@Test
115119
fun doubleInitDoesNotWait() {
116120
initSentry(true)
@@ -124,10 +128,6 @@ class SdkInitTests : BaseUiTest() {
124128
}
125129
val afterRestart = System.currentTimeMillis()
126130
val restartMs = afterRestart - beforeRestart
127-
// With tracing on, the second init sends a headless app start from a main thread IdleHandler.
128-
// It would take the profiler, so we let it finish before starting our transaction. Espresso's
129-
// onIdle() can return before IdleHandlers run, waitForIdleSync() can't.
130-
InstrumentationRegistry.getInstrumentation().waitForIdleSync()
131131

132132
relayIdlingResource.increment()
133133
Sentry.startTransaction("afterRestart", "emptyTransaction").finish()

0 commit comments

Comments
 (0)