File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
main/java/io/sentry/android/core
test/java/io/sentry/android/core Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,7 @@ static void loadDefaultAndMetadataOptions(
142142
143143 readDefaultOptionValues (options , finalContext , buildInfoProvider );
144144 AppState .getInstance ().registerLifecycleObserver (options );
145+ options .activate ();
145146 }
146147
147148 @ TestOnly
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import io.sentry.DateUtils
1616import io.sentry.Hint
1717import io.sentry.ILogger
1818import io.sentry.ISentryClient
19+ import io.sentry.NoOpSentryExecutorService
1920import io.sentry.Sentry
2021import io.sentry.Sentry.OptionsConfiguration
2122import io.sentry.SentryEnvelope
@@ -528,6 +529,19 @@ class SentryAndroidTest {
528529 assertEquals(99 , AppStartMetrics .getInstance().appStartTimeSpan.startUptimeMs)
529530 }
530531
532+ @Test
533+ fun `executor service is not NoOp when AndroidConnectionStatusProvider is initialized` () {
534+ var executorServiceIsNoOp = true
535+ fixture.initSut(context = context) { options ->
536+ options.dsn = " https://key@sentry.io/123"
537+ // the config callback runs before initializeIntegrationsAndProcessors, which creates
538+ // AndroidConnectionStatusProvider - so if the executor is already real here,
539+ // it's guaranteed to be real when the provider calls submitSafe()
540+ executorServiceIsNoOp = options.executorService is NoOpSentryExecutorService
541+ }
542+ assertFalse(executorServiceIsNoOp)
543+ }
544+
531545 @Test
532546 fun `if the config options block throws still intializes android event processors` () {
533547 lateinit var optionsRef: SentryOptions
You can’t perform that action at this time.
0 commit comments