Repository navigation
test(spring-boot): [Sample Tests 13] Move the Boot 2 sample's tests into the module - #6299
Draft
runningcode wants to merge 2 commits into
Draft
runningcode wants to merge 2 commits into
runningcode wants to merge 2 commits into
Conversation
📲 Install BuildsAndroid
|
This was referenced Oct 20, 2026
Draft
Draft
Draft
Draft
Draft
This was referenced Oct 20, 2026
Draft
Draft
Draft
Draft
runningcode
force-pushed
the
no/boot2-integration-test
branch
from
October 21, 2026 09:19
7f23ceb to
b00abe3
Compare
Adds an integrationTest suite to sentry-spring-boot that mirrors the jakarta one and ports the Boot 2 sample's Person, DistributedTracing, Todo, Cache and Metrics tests to it. Spring Boot 2 has no RestClient, so the tracing forwards through RestTemplate and Todo covers three clients, and WebClient is called on the request thread because Reactor 3.4 lacks automatic context propagation. The Person test is the jakarta one, which also checks the logged error and a span's feature flag that the Boot 2 sample never asserted. The Spring Boot 2 matrix runs the suite from 2.4 to 2.7. Below 2.7 the sample's remaining GraphQL and Kafka tests are excluded, so its systemTest no longer fails on finding none. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
runningcode
force-pushed
the
no/boot4-kafka-test
branch
from
October 21, 2026 11:27
09a1818 to
adfe6cb
Compare
runningcode
force-pushed
the
no/boot2-integration-test
branch
from
October 21, 2026 11:27
b00abe3 to
87fb9af
Compare
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
integrationTestsuite tosentry-spring-boot, modeled on the jakarta one. It ports these Boot 2 sample tests and deletes them from the sample:Changes from the jakarta suite, because Spring Boot 2 differs:
RestClient(Spring 5):RestTemplate.@LocalServerPortmoved packages within Boot 2: the Todo test reads the port fromTestRestTemplate's root URI instead, so the suite also compiles on Boot 2.4.kotlin-spring: classes stayopen, as in jakarta.Person test: this is the jakarta version, so it also checks the logged error and a span's feature flag, which the Boot 2 sample never asserted. Both pass on Boot 2.4 and 2.7.
Matrix: the Spring Boot 2 matrix now runs the suite on every version from 2.4 to 2.7.
Sample on old Boot versions: below 2.7, the sample's build excludes its remaining GraphQL and Kafka tests, leaving its
systemTestwith nothing to run. Gradle fails a test task that matches no tests, soisFailOnNoMatchingTestsis now off in that case. The next PR removes this task along with the rest of the sample's system-test setup.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.💡 Motivation and Context
This fans the Spring Boot 3 pilot out to Boot 2. The suite runs 16 tests.
💚 How did you test it?
systemTestpasses with no tests.:sentry-spring-boot:checkpasses.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Port the Boot 2 sample's GraphQL and Kafka tests, which only run on Boot 2.7 and later. Then retire the sample from the runner and CI.
#skip-changelog