Skip to content

test(logback): [Sample Tests 3] Move the logback system test into the module - #6268

Draft
runningcode wants to merge 1 commit into
no/shared-envelope-matchersfrom
no/logback-integration-test
Draft

runningcode wants to merge 1 commit into
no/shared-envelope-matchersfrom
no/logback-integration-test

Conversation

@runningcode

@runningcode runningcode commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

PR Stack (Sample Tests)


📜 Description

Replaces sentry-samples-logback's system test with SentryAppenderIntegrationTest in sentry-logback. The new test:

  • configures a fresh LoggerContext from an XML file. The file has a non-default name so logback's auto-configuration ignores it, and the DSN is substituted from a context property;
  • logs the same sequence the sample's Main does;
  • asserts events, breadcrumbs, feature flags and logs on MockSentryServer;
  • also checks that the XML contextTag reaches the event as a tag, which the old test didn't.

The sample has no tests left, so this PR also removes:

  • its system-test wiring and test dependencies;
  • its Kotlin plugin, which only the tests used;
  • its entries in system-tests-backend.yml and in the runner's module list.

💡 Motivation and Context

Until now, only the sample system test covered the appender's XML binding. That test needed the Python runner and a shadow JAR, and it ran in a non-blocking CI job. It now runs in about 3s as part of :sentry-logback:test.

💚 How did you test it?

  • :sentry-logback:check passes.
  • Temporarily broke an attribute assertion to confirm the test fails, with a clear Truth message.
  • :sentry-samples:sentry-samples-logback:build still builds the sample's shadow JAR.

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

The log4j2 and JUL console samples follow the same pattern.

#skip-changelog

The test now configures the appender from XML in-process and sends to
MockSentryServer, so it runs as part of :sentry-logback:test instead of
needing the Python runner and a shadow JAR. It also checks that the XML
contextTag reaches the event.

The logback sample has no tests left, so its system-test wiring, CI
matrix entry and runner entry are removed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@runningcode
runningcode force-pushed the no/logback-integration-test branch from 292c70a to fe98dc3 Compare October 15, 2026 14:23
@runningcode
runningcode force-pushed the no/shared-envelope-matchers branch from 47c6edc to cf186ed Compare October 15, 2026 14:23
@sentry

sentry Bot commented Oct 15, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.61.0 (1) release

⚙️ sentry-android Build Distribution Settings

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant