@@ -1243,7 +1243,9 @@ internal class RumSessionScopeTest {
12431243 RumSessionScope .RUM_SESSION_RENEWED_BUS_MESSAGE ,
12441244 RumSessionScope .RUM_SESSION_ID_BUS_MESSAGE_KEY to
12451245 testedScope.getRumContext().sessionId,
1246- RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate
1246+ RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate,
1247+ RumSessionScope .RUM_KEEP_SESSION_BUS_MESSAGE_KEY to
1248+ (testedScope.sessionState == RumSessionScope .State .TRACKED )
12471249 )
12481250 )
12491251 assertThat(argumentCaptor.secondValue).isEqualTo(
@@ -1252,7 +1254,9 @@ internal class RumSessionScopeTest {
12521254 RumSessionScope .RUM_SESSION_RENEWED_BUS_MESSAGE ,
12531255 RumSessionScope .RUM_SESSION_ID_BUS_MESSAGE_KEY to
12541256 testedScope.getRumContext().sessionId,
1255- RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate
1257+ RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate,
1258+ RumSessionScope .RUM_KEEP_SESSION_BUS_MESSAGE_KEY to
1259+ (testedScope.sessionState == RumSessionScope .State .TRACKED )
12561260 )
12571261 )
12581262 }
@@ -1288,7 +1292,9 @@ internal class RumSessionScopeTest {
12881292 RumSessionScope .RUM_SESSION_RENEWED_BUS_MESSAGE ,
12891293 RumSessionScope .RUM_SESSION_ID_BUS_MESSAGE_KEY to
12901294 testedScope.getRumContext().sessionId,
1291- RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate
1295+ RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate,
1296+ RumSessionScope .RUM_KEEP_SESSION_BUS_MESSAGE_KEY to
1297+ (testedScope.sessionState == RumSessionScope .State .TRACKED )
12921298 )
12931299 )
12941300 assertThat(argumentCaptor.secondValue).isEqualTo(
@@ -1297,7 +1303,9 @@ internal class RumSessionScopeTest {
12971303 RumSessionScope .RUM_SESSION_RENEWED_BUS_MESSAGE ,
12981304 RumSessionScope .RUM_SESSION_ID_BUS_MESSAGE_KEY to
12991305 testedScope.getRumContext().sessionId,
1300- RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate
1306+ RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate,
1307+ RumSessionScope .RUM_KEEP_SESSION_BUS_MESSAGE_KEY to
1308+ (testedScope.sessionState == RumSessionScope .State .TRACKED )
13011309 )
13021310 )
13031311 }
@@ -1326,15 +1334,19 @@ internal class RumSessionScopeTest {
13261334 RumSessionScope .SESSION_REPLAY_BUS_MESSAGE_TYPE_KEY to
13271335 RumSessionScope .RUM_SESSION_RENEWED_BUS_MESSAGE ,
13281336 RumSessionScope .RUM_SESSION_ID_BUS_MESSAGE_KEY to firstSessionId,
1329- RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate
1337+ RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate,
1338+ RumSessionScope .RUM_KEEP_SESSION_BUS_MESSAGE_KEY to
1339+ (testedScope.sessionState == RumSessionScope .State .TRACKED )
13301340 )
13311341 )
13321342 assertThat(argumentCaptor.secondValue).isEqualTo(
13331343 mapOf (
13341344 RumSessionScope .SESSION_REPLAY_BUS_MESSAGE_TYPE_KEY to
13351345 RumSessionScope .RUM_SESSION_RENEWED_BUS_MESSAGE ,
13361346 RumSessionScope .RUM_SESSION_ID_BUS_MESSAGE_KEY to secondSessionId,
1337- RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate
1347+ RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate,
1348+ RumSessionScope .RUM_KEEP_SESSION_BUS_MESSAGE_KEY to
1349+ (testedScope.sessionState == RumSessionScope .State .TRACKED )
13381350 )
13391351 )
13401352 }
@@ -1364,7 +1376,9 @@ internal class RumSessionScopeTest {
13641376 RumSessionScope .RUM_SESSION_RENEWED_BUS_MESSAGE ,
13651377 RumSessionScope .RUM_SESSION_ID_BUS_MESSAGE_KEY to
13661378 firstSessionId,
1367- RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate
1379+ RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate,
1380+ RumSessionScope .RUM_KEEP_SESSION_BUS_MESSAGE_KEY to
1381+ (testedScope.sessionState == RumSessionScope .State .TRACKED )
13681382 )
13691383 )
13701384 assertThat(argumentCaptor.secondValue).isEqualTo(
@@ -1373,7 +1387,9 @@ internal class RumSessionScopeTest {
13731387 RumSessionScope .RUM_SESSION_RENEWED_BUS_MESSAGE ,
13741388 RumSessionScope .RUM_SESSION_ID_BUS_MESSAGE_KEY to
13751389 secondSessionId,
1376- RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate
1390+ RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate,
1391+ RumSessionScope .RUM_KEEP_SESSION_BUS_MESSAGE_KEY to
1392+ (testedScope.sessionState == RumSessionScope .State .TRACKED )
13771393 )
13781394 )
13791395 }
@@ -1404,7 +1420,9 @@ internal class RumSessionScopeTest {
14041420 RumSessionScope .RUM_SESSION_RENEWED_BUS_MESSAGE ,
14051421 RumSessionScope .RUM_SESSION_ID_BUS_MESSAGE_KEY to
14061422 firstSessionId,
1407- RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate
1423+ RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate,
1424+ RumSessionScope .RUM_KEEP_SESSION_BUS_MESSAGE_KEY to
1425+ (testedScope.sessionState == RumSessionScope .State .TRACKED )
14081426 )
14091427 )
14101428 assertThat(argumentCaptor.secondValue).isEqualTo(
@@ -1413,7 +1431,9 @@ internal class RumSessionScopeTest {
14131431 RumSessionScope .RUM_SESSION_RENEWED_BUS_MESSAGE ,
14141432 RumSessionScope .RUM_SESSION_ID_BUS_MESSAGE_KEY to
14151433 secondSessionId,
1416- RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate
1434+ RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate,
1435+ RumSessionScope .RUM_KEEP_SESSION_BUS_MESSAGE_KEY to
1436+ (testedScope.sessionState == RumSessionScope .State .TRACKED )
14171437 )
14181438 )
14191439 assertThat(argumentCaptor.thirdValue).isEqualTo(
@@ -1422,7 +1442,9 @@ internal class RumSessionScopeTest {
14221442 RumSessionScope .RUM_SESSION_RENEWED_BUS_MESSAGE ,
14231443 RumSessionScope .RUM_SESSION_ID_BUS_MESSAGE_KEY to
14241444 secondSessionId,
1425- RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate
1445+ RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate,
1446+ RumSessionScope .RUM_KEEP_SESSION_BUS_MESSAGE_KEY to
1447+ (testedScope.sessionState == RumSessionScope .State .TRACKED )
14261448 )
14271449 )
14281450 }
@@ -1453,15 +1475,19 @@ internal class RumSessionScopeTest {
14531475 RumSessionScope .SESSION_REPLAY_BUS_MESSAGE_TYPE_KEY to
14541476 RumSessionScope .RUM_SESSION_RENEWED_BUS_MESSAGE ,
14551477 RumSessionScope .RUM_SESSION_ID_BUS_MESSAGE_KEY to firstSessionId,
1456- RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate
1478+ RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate,
1479+ RumSessionScope .RUM_KEEP_SESSION_BUS_MESSAGE_KEY to
1480+ (testedScope.sessionState == RumSessionScope .State .TRACKED )
14571481 )
14581482 )
14591483 assertThat(argumentCaptor.secondValue).isEqualTo(
14601484 mapOf (
14611485 RumSessionScope .SESSION_REPLAY_BUS_MESSAGE_TYPE_KEY to
14621486 RumSessionScope .RUM_SESSION_RENEWED_BUS_MESSAGE ,
14631487 RumSessionScope .RUM_SESSION_ID_BUS_MESSAGE_KEY to secondSessionId,
1464- RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate
1488+ RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate,
1489+ RumSessionScope .RUM_KEEP_SESSION_BUS_MESSAGE_KEY to
1490+ (testedScope.sessionState == RumSessionScope .State .TRACKED )
14651491 )
14661492 )
14671493 }
@@ -1492,15 +1518,19 @@ internal class RumSessionScopeTest {
14921518 RumSessionScope .SESSION_REPLAY_BUS_MESSAGE_TYPE_KEY to
14931519 RumSessionScope .RUM_SESSION_RENEWED_BUS_MESSAGE ,
14941520 RumSessionScope .RUM_SESSION_ID_BUS_MESSAGE_KEY to firstSessionId,
1495- RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate
1521+ RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate,
1522+ RumSessionScope .RUM_KEEP_SESSION_BUS_MESSAGE_KEY to
1523+ (testedScope.sessionState == RumSessionScope .State .TRACKED )
14961524 )
14971525 )
14981526 assertThat(argumentCaptor.secondValue).isEqualTo(
14991527 mapOf (
15001528 RumSessionScope .SESSION_REPLAY_BUS_MESSAGE_TYPE_KEY to
15011529 RumSessionScope .RUM_SESSION_RENEWED_BUS_MESSAGE ,
15021530 RumSessionScope .RUM_SESSION_ID_BUS_MESSAGE_KEY to secondSessionId,
1503- RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate
1531+ RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate,
1532+ RumSessionScope .RUM_KEEP_SESSION_BUS_MESSAGE_KEY to
1533+ (testedScope.sessionState == RumSessionScope .State .TRACKED )
15041534 )
15051535 )
15061536 }
@@ -1532,23 +1562,29 @@ internal class RumSessionScopeTest {
15321562 RumSessionScope .SESSION_REPLAY_BUS_MESSAGE_TYPE_KEY to
15331563 RumSessionScope .RUM_SESSION_RENEWED_BUS_MESSAGE ,
15341564 RumSessionScope .RUM_SESSION_ID_BUS_MESSAGE_KEY to firstSessionId,
1535- RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate
1565+ RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate,
1566+ RumSessionScope .RUM_KEEP_SESSION_BUS_MESSAGE_KEY to
1567+ (testedScope.sessionState == RumSessionScope .State .TRACKED )
15361568 )
15371569 )
15381570 assertThat(argumentCaptor.secondValue).isEqualTo(
15391571 mapOf (
15401572 RumSessionScope .SESSION_REPLAY_BUS_MESSAGE_TYPE_KEY to
15411573 RumSessionScope .RUM_SESSION_RENEWED_BUS_MESSAGE ,
15421574 RumSessionScope .RUM_SESSION_ID_BUS_MESSAGE_KEY to secondSessionId,
1543- RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate
1575+ RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate,
1576+ RumSessionScope .RUM_KEEP_SESSION_BUS_MESSAGE_KEY to
1577+ (testedScope.sessionState == RumSessionScope .State .TRACKED )
15441578 )
15451579 )
15461580 assertThat(argumentCaptor.thirdValue).isEqualTo(
15471581 mapOf (
15481582 RumSessionScope .SESSION_REPLAY_BUS_MESSAGE_TYPE_KEY to
15491583 RumSessionScope .RUM_SESSION_RENEWED_BUS_MESSAGE ,
15501584 RumSessionScope .RUM_SESSION_ID_BUS_MESSAGE_KEY to secondSessionId,
1551- RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate
1585+ RumSessionScope .RUM_SESSION_SAMPLE_RATE_BUS_MESSAGE_KEY to testedScope.sessionSampleRate,
1586+ RumSessionScope .RUM_KEEP_SESSION_BUS_MESSAGE_KEY to
1587+ (testedScope.sessionState == RumSessionScope .State .TRACKED )
15521588 )
15531589 )
15541590 }
0 commit comments