Repository navigation
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
Draft
runningcode wants to merge 2 commits into
runningcode wants to merge 2 commits into
Conversation
…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>
📲 Install BuildsAndroid
|
This was referenced Oct 20, 2026
Draft
Draft
Draft
Draft
This was referenced Oct 20, 2026
Draft
Draft
Draft
Draft
…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
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
Adds an
integrationTestWebfluxsuite tosentry-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'swebclientstarter.TestRestTemplate: Boot 4 only provides it with@AutoConfigureTestRestTemplate. It also needs therestclientstarter on the classpath; without it the context fails to load withNoClassDefFoundError: RestTemplateBuilder. Adding the starter doesn't pull in the servlet stack, so the app still runs on Netty.tools.jackson.databindreplacescom.fasterxml.jackson.databind.openmodifiers dropped: this module applieskotlin-spring.@LocalServerPort. On Boot 4.0.0, the expected URL built fromTestRestTemplate's root URI didn't match the span'shttp://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.
integrationTestsincludes it too.After a coverage audit against the sample's tests:
sample_randand deferred-sampling tests check the envelope header's trace ID, and a test client built outside the context, as in test(spring-boot): [Sample Tests 7] Move the Boot 3 tracing and HTTP client tests #6293, and restores the Cache and Metrics tests, as in test(spring-boot): [Sample Tests 17] Move the Boot 3 WebFlux sample's tests into the module #6308.💡 Motivation and Context
This continues the WebFlux flavor with Boot 4.
💚 How did you test it?
:sentry-spring-boot-4:checkpasses.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
The Boot 2 WebFlux sample.
#skip-changelog