5
5
6
6
package io.opentelemetry.android.internal.session
7
7
8
- import io.opentelemetry.android.internal.session.SessionIdTimeoutHandler .Companion.DEFAULT_SESSION_TIMEOUT
8
+ import io.opentelemetry.android.internal.session.SessionBackgroundTimeoutHandler .Companion.DEFAULT_SESSION_TIMEOUT
9
9
import io.opentelemetry.sdk.testing.time.TestClock
10
10
import org.junit.jupiter.api.Assertions.assertFalse
11
11
import org.junit.jupiter.api.Assertions.assertTrue
@@ -18,7 +18,7 @@ class SessionIdTimeoutHandlerTest {
18
18
fun shouldNeverTimeOutInForeground () {
19
19
val clock: TestClock = TestClock .create()
20
20
val timeoutHandler =
21
- SessionIdTimeoutHandler (clock, DEFAULT_SESSION_TIMEOUT )
21
+ SessionBackgroundTimeoutHandler (clock, DEFAULT_SESSION_TIMEOUT )
22
22
23
23
assertFalse(timeoutHandler.hasTimedOut())
24
24
timeoutHandler.bump()
@@ -32,7 +32,7 @@ class SessionIdTimeoutHandlerTest {
32
32
fun shouldApply15MinutesTimeoutToAppsInBackground () {
33
33
val clock: TestClock = TestClock .create()
34
34
val timeoutHandler =
35
- SessionIdTimeoutHandler (clock, DEFAULT_SESSION_TIMEOUT )
35
+ SessionBackgroundTimeoutHandler (clock, DEFAULT_SESSION_TIMEOUT )
36
36
37
37
timeoutHandler.onApplicationBackgrounded()
38
38
timeoutHandler.bump()
@@ -64,7 +64,7 @@ class SessionIdTimeoutHandlerTest {
64
64
fun shouldApplyTimeoutToFirstSpanAfterAppBeingMovedToForeground () {
65
65
val clock: TestClock = TestClock .create()
66
66
val timeoutHandler =
67
- SessionIdTimeoutHandler (clock, DEFAULT_SESSION_TIMEOUT )
67
+ SessionBackgroundTimeoutHandler (clock, DEFAULT_SESSION_TIMEOUT )
68
68
69
69
timeoutHandler.onApplicationBackgrounded()
70
70
timeoutHandler.bump()
@@ -84,7 +84,7 @@ class SessionIdTimeoutHandlerTest {
84
84
fun shouldApplyCustomTimeoutToFirstSpanAfterAppBeingMovedToForeground () {
85
85
val clock: TestClock = TestClock .create()
86
86
val timeoutHandler =
87
- SessionIdTimeoutHandler (clock, Duration .ofNanos(5 ))
87
+ SessionBackgroundTimeoutHandler (clock, Duration .ofNanos(5 ))
88
88
89
89
timeoutHandler.onApplicationBackgrounded()
90
90
timeoutHandler.bump()
0 commit comments