Skip to content

Commit cee0b84

Browse files
committed
Merge branch 'feat/app-start-extension-materialize' into feat/app-start-extension-api
2 parents 7aadcb9 + 824c12f commit cee0b84

2 files changed

Lines changed: 0 additions & 13 deletions

File tree

sentry-android-core/src/test/java/io/sentry/android/core/ActivityLifecycleIntegrationTest.kt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -367,16 +367,12 @@ class ActivityLifecycleIntegrationTest {
367367
fixture.createdTransactions.filter {
368368
it.spanContext.operation == ActivityLifecycleIntegration.STANDALONE_APP_START_OP
369369
}
370-
// The eager app.start txn is reused; no second one is created at the first activity.
371370
assertEquals(1, appStartTransactions.size)
372-
// The screen (first activity) is attached to the eager app.start, matching foreground
373-
// standalone.
374371
assertEquals("Activity", appStartTransactions.single().getData("app.vitals.start.screen"))
375372
val uiLoadTransaction =
376373
fixture.createdTransactions.single {
377374
it.spanContext.operation == ActivityLifecycleIntegration.UI_LOAD_OP
378375
}
379-
// ui.load shares the eager app.start trace.
380376
assertEquals(
381377
appStartTransactions.single().spanContext.traceId,
382378
uiLoadTransaction.spanContext.traceId,
@@ -410,7 +406,6 @@ class ActivityLifecycleIntegrationTest {
410406
sut.onActivityPaused(firstActivity)
411407
sut.onActivityCreated(secondActivity, fixture.bundle)
412408

413-
// The second activity must not continue the already-finished extended app.start trace.
414409
assertNotEquals(appStartTraceId, fixture.createdTransactions.last().spanContext.traceId)
415410
}
416411

@@ -459,7 +454,6 @@ class ActivityLifecycleIntegrationTest {
459454
it.spanContext.operation == ActivityLifecycleIntegration.STANDALONE_APP_START_OP
460455
}
461456

462-
// waitForChildren keeps the app start transaction open until the extension finishes.
463457
appStartTransaction.finish(SpanStatus.OK)
464458
assertFalse(appStartTransaction.isFinished)
465459

@@ -487,7 +481,6 @@ class ActivityLifecycleIntegrationTest {
487481
it.operation == ActivityLifecycleIntegration.APP_START_EXTENDED_OP
488482
}
489483
)
490-
// Headless finishes the transaction, but waitForChildren holds it until the extension finishes.
491484
assertFalse(transaction.isFinished)
492485

493486
AppStartMetrics.getInstance().appStartExtension.finishExtendedAppStart()
@@ -522,8 +515,6 @@ class ActivityLifecycleIntegrationTest {
522515

523516
prepareHeadlessAppStart(appStartType = AppStartType.COLD)
524517
AppStartMetrics.getInstance().appStartExtension.extendAppStart()
525-
// Finish and send the extension's app.start (onAppStartSpansSent is normally driven by the
526-
// event processor) before the headless idle check runs.
527518
AppStartMetrics.getInstance().appStartExtension.finishExtendedAppStart()
528519
AppStartMetrics.getInstance().onAppStartSpansSent()
529520
val transactionsBefore = fixture.createdTransactions.size
@@ -562,8 +553,6 @@ class ActivityLifecycleIntegrationTest {
562553
sut.onActivityCreated(activity, fixture.bundle)
563554
assertTrue(AppStartMetrics.getInstance().appStartExtension.isActive)
564555

565-
// The eager txn is owned by the extension, not the integration's appStartTransaction field, so
566-
// the per-activity cleanup can't cancel it.
567556
sut.onActivityDestroyed(activity)
568557
assertTrue(AppStartMetrics.getInstance().appStartExtension.isActive)
569558
}

sentry-android-core/src/test/java/io/sentry/android/core/PerformanceAndroidEventProcessorTest.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ class PerformanceAndroidEventProcessorTest {
216216
setStoppedAt(100)
217217
}
218218
val startMs = metrics.appStartTimeSpan.startTimestampMs
219-
// extended end is 500ms after start, well past the ~99ms natural duration
220219
extendAppStartFinishedWith(SpanStatus.OK, startMs + 500)
221220

222221
var tr = createUiLoadTransactionWithAppStartChildSpan()
@@ -236,7 +235,6 @@ class PerformanceAndroidEventProcessorTest {
236235
setStoppedAt(1000)
237236
}
238237
val startMs = metrics.appStartTimeSpan.startTimestampMs
239-
// finished early (100ms), before the 999ms natural first-frame duration
240238
extendAppStartFinishedWith(SpanStatus.OK, startMs + 100)
241239

242240
var tr = createUiLoadTransactionWithAppStartChildSpan()

0 commit comments

Comments
 (0)