Skip to content

Commit d32fda0

Browse files
romtsnclaude
andcommitted
Fix leak in ReplayIntegration due to persisting executor not being shut down
Add the persistingExecutor argument to SessionCaptureStrategy and BufferCaptureStrategy constructor calls in tests, and add changelog entry. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f1f9ca7 commit d32fda0

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
### Fixes
6+
7+
- Fix leak in `ReplayIntegration` due to persisting executor not being shut down ([#5627](https://github.com/getsentry/sentry-java/pull/5627))
8+
39
## 8.45.0
410

511
### Features

sentry-android-replay/src/test/java/io/sentry/android/replay/ReplayIntegrationTest.kt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,12 @@ class ReplayIntegrationTest {
754754
null
755755
}
756756
},
757+
mock {
758+
whenever(mock.submit(any<Runnable>())).doAnswer {
759+
(it.arguments[0] as Runnable).run()
760+
null
761+
}
762+
},
757763
) { _ ->
758764
fixture.replayCache
759765
}
@@ -1116,5 +1122,12 @@ class ReplayIntegrationTest {
11161122
null
11171123
}
11181124
},
1125+
persistingExecutor =
1126+
mock {
1127+
whenever(mock.submit(any<Runnable>())).doAnswer {
1128+
(it.arguments[0] as Runnable).run()
1129+
null
1130+
}
1131+
},
11191132
)
11201133
}

0 commit comments

Comments
 (0)