@@ -162,13 +162,13 @@ class EnvelopeCacheTest {
162162 }
163163
164164 @Test
165- fun `delayed same SID SessionStart preserves newer pending snapshot` () {
165+ fun `delayed same SID SessionStart preserves newer unhandled snapshot` () {
166166 val cache = fixture.getSUT()
167167 val sid = SentryUUID .generateSentryId()
168168 val currentSessionFile = EnvelopeCache .getCurrentSessionFile(fixture.options.cacheDirPath!! )
169169 val previousSessionFile = EnvelopeCache .getPreviousSessionFile(fixture.options.cacheDirPath!! )
170170 val newerSession = createSession(sessionId = sid)
171- newerSession.markPendingUnhandled ()
171+ newerSession.recordNonTerminatingUnhandledError ()
172172 cache.persistCurrentSession(newerSession)
173173
174174 val delayedStart = createSession(sessionId = sid)
@@ -181,7 +181,7 @@ class EnvelopeCacheTest {
181181 Session ::class .java,
182182 )!!
183183 assertThat(persistedSession.sessionId).isEqualTo(sid)
184- assertThat(persistedSession.isPendingUnhandled ).isTrue()
184+ assertThat(persistedSession.hasNonTerminatingUnhandledError() ).isTrue()
185185 assertThat(persistedSession.errorCount()).isEqualTo(1 )
186186 assertThat(previousSessionFile.exists()).isFalse()
187187 }
@@ -206,7 +206,7 @@ class EnvelopeCacheTest {
206206 Session ::class .java,
207207 )!!
208208 assertThat(persistedSession.sessionId).isEqualTo(sid)
209- assertThat(persistedSession.isPendingUnhandled ).isFalse()
209+ assertThat(persistedSession.hasNonTerminatingUnhandledError() ).isFalse()
210210 assertThat(persistedSession.errorCount()).isEqualTo(1 )
211211 assertThat(previousSessionFile.exists()).isFalse()
212212 }
@@ -280,11 +280,11 @@ class EnvelopeCacheTest {
280280 }
281281
282282 @Test
283- fun `mismatching SessionEnd preserves newer pending current session` () {
283+ fun `mismatching SessionEnd preserves newer unhandled current session` () {
284284 val cache = fixture.getSUT()
285285 val endingSession = createSession(started = Date (1_000 ))
286286 val currentSession = createSession(started = Date (2_000 ))
287- currentSession.markPendingUnhandled ()
287+ currentSession.recordNonTerminatingUnhandledError ()
288288 cache.persistCurrentSession(currentSession)
289289
290290 val envelope = SentryEnvelope .from(fixture.options.serializer, endingSession, null )
@@ -300,10 +300,10 @@ class EnvelopeCacheTest {
300300 }
301301
302302 @Test
303- fun `mismatching newer SessionEnd deletes stale pending current session` () {
303+ fun `mismatching newer SessionEnd deletes stale unhandled current session` () {
304304 val cache = fixture.getSUT()
305305 val currentSession = createSession(started = Date (1_000 ))
306- currentSession.markPendingUnhandled ()
306+ currentSession.recordNonTerminatingUnhandledError ()
307307 cache.persistCurrentSession(currentSession)
308308 val endingSession = createSession(started = Date (2_000 ))
309309
@@ -315,7 +315,7 @@ class EnvelopeCacheTest {
315315 }
316316
317317 @Test
318- fun `mismatching SessionEnd deletes non-pending current session` () {
318+ fun `mismatching SessionEnd deletes current session without unhandled error ` () {
319319 val cache = fixture.getSUT()
320320 val currentSession = createSession()
321321 cache.persistCurrentSession(currentSession)
@@ -555,11 +555,11 @@ class EnvelopeCacheTest {
555555 }
556556
557557 @Test
558- fun `AbnormalExit hint keeps persisted pending session as abnormal` () {
558+ fun `AbnormalExit hint keeps persisted unhandled session as abnormal` () {
559559 val cache = fixture.getSUT()
560560
561561 val previousSessionFile = EnvelopeCache .getPreviousSessionFile(fixture.options.cacheDirPath!! )
562- val session = createSession().apply { setPendingUnhandled (true ) }
562+ val session = createSession().apply { setNonTerminatingUnhandledError (true ) }
563563 fixture.options.serializer.serialize(session, previousSessionFile.bufferedWriter())
564564
565565 val envelope = SentryEnvelope .from(fixture.options.serializer, SentryEvent (), null )
@@ -581,7 +581,7 @@ class EnvelopeCacheTest {
581581 )
582582 assertEquals(State .Abnormal , updatedSession!! .status)
583583 assertEquals(" abnormal_mechanism" , updatedSession.abnormalMechanism)
584- assertTrue(updatedSession.isPendingUnhandled )
584+ assertTrue(updatedSession.hasNonTerminatingUnhandledError() )
585585 }
586586
587587 @Test
@@ -639,11 +639,11 @@ class EnvelopeCacheTest {
639639 }
640640
641641 @Test
642- fun `NativeCrashExit hint keeps persisted pending session as crashed` () {
642+ fun `NativeCrashExit hint keeps persisted unhandled session as crashed` () {
643643 val cache = fixture.getSUT()
644644
645645 val previousSessionFile = EnvelopeCache .getPreviousSessionFile(fixture.options.cacheDirPath!! )
646- val session = createSession().apply { setPendingUnhandled (true ) }
646+ val session = createSession().apply { setNonTerminatingUnhandledError (true ) }
647647 fixture.options.serializer.serialize(session, previousSessionFile.bufferedWriter())
648648
649649 val nativeCrashTimestamp = session.started!! .time + TimeUnit .HOURS .toMillis(1 )
@@ -658,7 +658,7 @@ class EnvelopeCacheTest {
658658 )
659659 assertEquals(State .Crashed , updatedSession!! .status)
660660 assertEquals(nativeCrashTimestamp, updatedSession.timestamp!! .time)
661- assertFalse(updatedSession.isPendingUnhandled )
661+ assertFalse(updatedSession.hasNonTerminatingUnhandledError() )
662662 }
663663
664664 @Test
0 commit comments