Repository navigation
test(jul): [Sample Tests 31] Move the JUL sample's system test into sentry-jul - #6323
Draft
runningcode wants to merge 2 commits into
Draft
runningcode wants to merge 2 commits into
runningcode wants to merge 2 commits into
Conversation
Adds SentryHandlerIntegrationTest, which configures the Sentry handler through a logging properties file read by LogManager, as the sample does, and checks what reaches MockSentryServer: the warning with its flag, the error with its exception and breadcrumbs, and the logs with their attributes. Its logger is outside io.sentry, whose loggers the handler drops, and the test restores the LogManager configuration the other tests read. The sample has no system tests left, so it comes off the system-test runner and the backend workflow, and drops the Kotlin plugin it only needed for the test. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Oct 20, 2026
Draft
Draft
Draft
Draft
Draft
4 of 9 tasks
📲 Install BuildsAndroid
|
This was referenced Oct 20, 2026
Draft
Draft
Draft
Draft
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Stack (Sample Tests)
main)📜 Description
Moves
sentry-samples-jul's system test intosentry-julasSentryHandlerIntegrationTest, the JUL version of #6268 and #6322. As in the sample,LogManagerreads a logging properties file,sentry-handler-integration-test.propertieswith the sample's handler levels, and builds theSentryHandlerfrom it. The test then checks what reachesMockSentryServer:RuntimeExceptionand the config and info breadcrumbs;Three details:
sentry.properties, here thesentry.dsnsystem property. The module's testsentry.propertiesalready enables logs.com.example.App.SentryHandlerdrops records fromio.sentryloggers so it doesn't capture the SDK's own logs, so a logger named after the test class would send nothing.readConfigurationreplaces the JVM-wideLogManagerconfiguration. The test restores the one the module's other tests read, which also closes its handler.With no system tests left, the sample comes off the runner and the backend workflow. It also drops the Kotlin plugin, which only the test needed.
sentry-julgets Truth as a test dependency.💡 Motivation and Context
The JUL handler's
LogManagerconfiguration now runs in./gradlew :sentry-jul:test.💚 How did you test it?
SentryHandlerTest'sLogManager-based test, which runs after it.:sentry-jul:checkpasses, and the sample's JAR still builds.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
The plain console sample: profiling into
sentry-async-profiler, Kafka intosentry-kafka.#skip-changelog
🤖 Generated with Claude Code