Skip to content

test(spring-boot): [Sample Tests 17] Move the Boot 3 WebFlux sample's tests into the module - #6308

Draft
runningcode wants to merge 7 commits into
no/delete-log4j2-boot-system-testsfrom
no/boot3-webflux-integration-test
Draft

runningcode wants to merge 7 commits into
no/delete-log4j2-boot-system-testsfrom
no/boot3-webflux-integration-test

Conversation

@runningcode

@runningcode runningcode commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

PR Stack (Sample Tests)


📜 Description

Adds an integrationTestWebflux suite to sentry-spring-boot-jakarta. Its classpath has WebFlux but not the servlet stack, so Spring Boot starts a reactive Netty server. It ports these tests from sentry-samples-spring-boot-webflux-jakarta:

  • Person:
    • A failed request reports its error with the feature flag, its http.server transaction, and logs.
    • Creating a person finishes on another thread through a delayed Mono, and is traced and profiled.
  • DistributedTracing: the servlet suite's test, unchanged. Here the app forwards through WebClient.
  • Todo: the WebClient request's http.client span. It calls a local stub instead of the internet.
  • GraphQL: the greeting query, and its resolver error tied to its transaction by trace ID.

The sample's CacheSystemTest and MetricsSystemTest were byte-identical to the servlet ones. They run in this suite too, with cache tracing enabled as the sample had it, so their assertions also hold in the reactive app.

The app builds its own URLs from the incoming request, because a reactive app has no servlet request to read them from. The suite sets sentry.reactive.thread-local-accessor-enabled=true, like the sample.

With no system tests left, the sample comes off the runner, the backend workflow and the Spring Boot 3 matrix. The matrix now runs the new suite.

After a coverage audit against the sample's tests:

💡 Motivation and Context

This continues moving the sample system tests into modules, starting the WebFlux flavor with Boot 3.

💚 How did you test it?

  • All 11 tests pass on Spring Boot 3.5.0.
  • They also pass with the catalog set to 3.2.12, the matrix's oldest version.
  • Breaking the Todo span's URL makes that test fail.
  • The slimmed sample still builds.
  • :sentry-spring-boot-jakarta:check passes.

📝 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 Boot 4 and Boot 2 WebFlux samples.

#skip-changelog

@sentry

sentry Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

📲 Install Builds

Android

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

⚙️ sentry-android Build Distribution Settings

This was referenced Oct 20, 2026
@runningcode
runningcode force-pushed the no/delete-log4j2-boot-system-tests branch from d920038 to ab05cf1 Compare October 21, 2026 09:19
@runningcode
runningcode force-pushed the no/boot3-webflux-integration-test branch 2 times, most recently from 6f7ce55 to e5ffa4d Compare October 21, 2026 11:27
@runningcode
runningcode force-pushed the no/delete-log4j2-boot-system-tests branch 2 times, most recently from ca0c043 to 7473271 Compare October 22, 2026 12:40
@runningcode
runningcode force-pushed the no/boot3-webflux-integration-test branch from e5ffa4d to 6c38c20 Compare October 22, 2026 12:40
@runningcode
runningcode force-pushed the no/delete-log4j2-boot-system-tests branch from 7473271 to 7b862db Compare October 22, 2026 13:31
@runningcode
runningcode force-pushed the no/boot3-webflux-integration-test branch 3 times, most recently from 95a686c to 33f8060 Compare October 22, 2026 16:02
@runningcode
runningcode force-pushed the no/delete-log4j2-boot-system-tests branch 2 times, most recently from 0dd9a37 to 411f8e5 Compare October 23, 2026 08:24
@runningcode
runningcode force-pushed the no/boot3-webflux-integration-test branch 2 times, most recently from 3220952 to 7a36f8e Compare October 23, 2026 08:58
@runningcode
runningcode force-pushed the no/delete-log4j2-boot-system-tests branch from 13cce21 to 7658695 Compare October 23, 2026 09:35
@runningcode
runningcode force-pushed the no/boot3-webflux-integration-test branch 2 times, most recently from 138c1d1 to 81c306e Compare October 23, 2026 11:51
runningcode and others added 7 commits October 23, 2026 14:46
…odule

Ports the Boot 2 sample's GraphQL and Kafka tests to the
integrationTest suite. Both need Spring Boot 2.7, while the Spring
Boot 2 matrix also covers 2.4 to 2.6, so below 2.7 the suite leaves out
their dependencies and sources.

That also keeps the broker off the shared base class: the Kafka test
runs its own application context under a kafka profile with
@embeddedkafka, and each context gets its own in-memory database. The
second context re-initializes the global SDK; the app reaches Sentry
through ScopesAdapter, so the other tests pass in either order.

The Boot 2 sample has no system tests left, so it comes off the
system-test runner, the backend workflow and the Spring Boot 2 matrix.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… creator ids

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The jakarta-log4j2 and 4-log4j2 samples' system tests were copies of the
plain samples' tests, which now run in the modules' integrationTest
suites. The only addition was a check that a logged error carries the
Log4j integration. That's covered by SentryLog4j2AppenderAutoConfigurationTest,
which checks the appender Spring Boot attaches, and by sentry-log4j2's
own tests of what the appender sends.

Both samples come off the system-test runner and the backend workflow.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The log4j2 Boot samples' tests were removed as covered elsewhere, but
nothing else sends an event through the Log4j2 appender that Spring
Boot's auto-configuration attaches. integrationTestLog4j2, in
sentry-spring-boot-jakarta and sentry-spring-boot-4, runs a servlet app
with Log4j2 instead of Logback and checks that an error logged through
SLF4J reaches Sentry with the request's feature flag and the Log4j
integration, as the samples' Person test did.

Gradle's module replacement swaps the starters, as Spring Boot
documents. It only acts on a classpath with both, which only this
suite has.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…dule

Adds an integrationTestWebflux suite to sentry-spring-boot-jakarta. It
runs a reactive app without the servlet stack, so Spring Boot starts a
WebFlux server, and ports the WebFlux sample's Person,
DistributedTracing, Todo and GraphQL tests. The sample's Cache and
Metrics tests were copies of the servlet ones and don't depend on the
web stack, so the integrationTest suite already covers them.

The WebFlux sample has no system tests left, so it comes off the
system-test runner, the backend workflow and the Spring Boot 3 matrix,
which now runs the new suite.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ore Cache and Metrics

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…lver

The sample's resolver returned a Mono, so its test covered Sentry
finishing the field's span when the Mono completes. The port returned a
String, which only covers the synchronous path.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@runningcode
runningcode force-pushed the no/delete-log4j2-boot-system-tests branch from 0d7fbb8 to cac3297 Compare October 23, 2026 12:48
@runningcode
runningcode force-pushed the no/boot3-webflux-integration-test branch from 81c306e to 95a0f9f Compare October 23, 2026 12:48
@runningcode
runningcode force-pushed the no/delete-log4j2-boot-system-tests branch from cac3297 to 0e2c0b7 Compare October 23, 2026 13:02
@runningcode
runningcode force-pushed the no/boot3-webflux-integration-test branch from 95a0f9f to 1f31f97 Compare October 23, 2026 13:02
@runningcode
runningcode force-pushed the no/delete-log4j2-boot-system-tests branch from 0e2c0b7 to 0523822 Compare October 23, 2026 13:28

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