@@ -470,7 +470,7 @@ class InternalSentrySdkTest {
470470 }
471471
472472 @Test
473- fun `captureEnvelopeNonTerminating keeps the session Ok and marks it pending unhandled` () {
473+ fun `captureEnvelopeNonTerminating keeps the session Ok and flags the unhandled error ` () {
474474 val fixture = Fixture ()
475475 fixture.init (context)
476476
@@ -488,19 +488,19 @@ class InternalSentrySdkTest {
488488 assertThat(capturedEnvelopeItems).hasSize(1 )
489489 assertThat(capturedEnvelopeItems[0 ].header.type).isEqualTo(SentryItemType .Event )
490490
491- // and the session stays alive on the scope, same id, marked pending unhandled
491+ // and the session stays alive on the scope, same id, flagged with the unhandled error
492492 val scopeSession = AtomicReference <Session >()
493493 Sentry .configureScope { scope -> scopeSession.set(scope.session) }
494494 assertThat(scopeSession.get().status).isEqualTo(Session .State .Ok )
495- assertThat(scopeSession.get().isPendingUnhandled ).isTrue()
495+ assertThat(scopeSession.get().hasNonTerminatingUnhandledError() ).isTrue()
496496 assertThat(scopeSession.get().sessionId).isEqualTo(originalSid.get())
497497
498498 // and it is persisted so pending survives process death
499499 val sessionFile = EnvelopeCache .getCurrentSessionFile(fixture.options.cacheDirPath!! )
500500 val persistedSession =
501501 fixture.options.serializer.deserialize(sessionFile.reader(), Session ::class .java)!!
502502 assertThat(persistedSession.status).isEqualTo(Session .State .Ok )
503- assertThat(persistedSession.isPendingUnhandled ).isTrue()
503+ assertThat(persistedSession.hasNonTerminatingUnhandledError() ).isTrue()
504504 assertThat(persistedSession.sessionId).isEqualTo(originalSid.get())
505505 }
506506
@@ -544,7 +544,7 @@ class InternalSentrySdkTest {
544544 val pendingSession = AtomicReference <Session >()
545545 Sentry .configureScope { scope -> pendingSession.set(scope.session) }
546546 val oldSid = pendingSession.get().sessionId
547- assertThat(pendingSession.get().isPendingUnhandled ).isTrue()
547+ assertThat(pendingSession.get().hasNonTerminatingUnhandledError() ).isTrue()
548548 fixture.capturedEnvelopes.clear()
549549
550550 // when a subsequent hard crash is captured through the existing terminating API
@@ -562,14 +562,14 @@ class InternalSentrySdkTest {
562562 Session ::class .java,
563563 )!!
564564 assertThat(crashedSession.status).isEqualTo(Session .State .Crashed )
565- assertThat(crashedSession.isPendingUnhandled ).isFalse()
565+ assertThat(crashedSession.hasNonTerminatingUnhandledError() ).isFalse()
566566 assertThat(crashedSession.sessionId).isEqualTo(oldSid)
567567
568568 // and a new Ok session with a different id is active
569569 val activeSession = AtomicReference <Session >()
570570 Sentry .configureScope { scope -> activeSession.set(scope.session) }
571571 assertThat(activeSession.get().status).isEqualTo(Session .State .Ok )
572- assertThat(activeSession.get().isPendingUnhandled ).isFalse()
572+ assertThat(activeSession.get().hasNonTerminatingUnhandledError() ).isFalse()
573573 assertThat(activeSession.get().sessionId).isNotEqualTo(oldSid)
574574 }
575575
0 commit comments