From e856b81aa5c8de6834aac8f6b48fb07b7ab3e6aa Mon Sep 17 00:00:00 2001 From: Markus Hintersteiner Date: Fri, 24 Nov 2023 08:08:50 +0100 Subject: [PATCH] Fix tests --- .../android/core/cache/AndroidEnvelopeCacheTest.kt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sentry-android-core/src/test/java/io/sentry/android/core/cache/AndroidEnvelopeCacheTest.kt b/sentry-android-core/src/test/java/io/sentry/android/core/cache/AndroidEnvelopeCacheTest.kt index 2133ad9729..7448c215c7 100644 --- a/sentry-android-core/src/test/java/io/sentry/android/core/cache/AndroidEnvelopeCacheTest.kt +++ b/sentry-android-core/src/test/java/io/sentry/android/core/cache/AndroidEnvelopeCacheTest.kt @@ -49,8 +49,13 @@ class AndroidEnvelopeCacheTest { if (appStartMillis != null) { AppStartMetrics.getInstance().apply { - appStartTimeSpan.setStartedAt(appStartMillis) - appStartTimeSpan.setStartUnixTimeMs(appStartMillis) + if (options.isEnableStarfish) { + appStartTimeSpan.setStartedAt(appStartMillis) + appStartTimeSpan.setStartUnixTimeMs(appStartMillis) + } else { + legacyAppStartTimeSpan.setStartedAt(appStartMillis) + legacyAppStartTimeSpan.setStartUnixTimeMs(appStartMillis) + } } } if (currentTimeMillis != null) {