Skip to content

test(spring-boot): [Sample Tests 18] Move the Boot 4 WebFlux sample's tests into the module - #6310

Draft
runningcode wants to merge 2 commits into
no/boot3-webflux-integration-testfrom
no/boot4-webflux-integration-test
Draft

runningcode wants to merge 2 commits into
no/boot3-webflux-integration-testfrom
no/boot4-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-4, a copy of the Boot 3 one from #6308 with the same tests: Person, DistributedTracing, Todo (WebClient) and the GraphQL greeting. The Boot 4 WebFlux sample's tests were copies of the Boot 3 WebFlux ones.

Changes for Spring Boot 4:

  • WebClient.Builder: comes from Boot 4's webclient starter.
  • TestRestTemplate: Boot 4 only provides it with @AutoConfigureTestRestTemplate. It also needs the restclient starter on the classpath; without it the context fails to load with NoClassDefFoundError: RestTemplateBuilder. Adding the starter doesn't pull in the servlet stack, so the app still runs on Netty.
  • Jackson 3: tools.jackson.databind replaces com.fasterxml.jackson.databind.
  • open modifiers dropped: this module applies kotlin-spring.
  • Todo test port: read with @LocalServerPort. On Boot 4.0.0, the expected URL built from TestRestTemplate's root URI didn't match the span's http://localhost:<port>/... URL, so the test failed there; on 4.1.0 it matched. The Boot 4 servlet suite already uses @LocalServerPort.

The sample's Cache and Metrics copies run in this suite too, as in #6308. With no system tests left, the sample comes off the runner, the backend workflow and the Spring Boot 4 matrix, which now runs the new suite. integrationTests includes it too.

After a coverage audit against the sample's tests:

💡 Motivation and Context

This continues the WebFlux flavor with Boot 4.

💚 How did you test it?

  • All 11 tests pass on Spring Boot 4.1.0.
  • They also pass with the catalog set to 4.0.0, the matrix's oldest version.
  • The slimmed sample still builds.
  • :sentry-spring-boot-4: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 2 WebFlux sample.

#skip-changelog

…dule

Adds an integrationTestWebflux suite to sentry-spring-boot-4 that
mirrors the Boot 3 one, adjusted for Spring Boot 4: the webclient
starter for WebClient.Builder, the restclient starter that
TestRestTemplate needs, Jackson 3, and @AutoConfigureTestRestTemplate.
The Todo test reads the port with @LocalServerPort because
TestRestTemplate's root URI doesn't hold the port on Boot 4.0.

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

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@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.0 (1) release

⚙️ sentry-android Build Distribution Settings

This was referenced Oct 20, 2026
…4 WebFlux

Ports the tracing checks and the plain test client to the Boot 4
WebFlux suite, and restores the WebFlux sample's Cache and Metrics
tests there, with cache tracing enabled as the sample had it.

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

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