Skip to content

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

Draft
runningcode wants to merge 3 commits into
no/boot-jakarta-kafka-testfrom
no/boot4-integration-test
Draft

runningcode wants to merge 3 commits into
no/boot-jakarta-kafka-testfrom
no/boot4-integration-test

Conversation

@runningcode

@runningcode runningcode commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

PR Stack (Sample Tests)


📜 Description

Adds an integrationTest suite to sentry-spring-boot-4, modeled on the jakarta one. It ports these Boot 4 sample tests and deletes them from the sample:

  • Person
  • DistributedTracing
  • Todo
  • Cache
  • Metrics
  • the three GraphQL classes

The sample's tests were byte-identical to the jakarta ones; Person differs by 0 lines. So the suite copies the jakarta suite, with these changes for Spring Boot 4:

  • TestRestTemplate: moved to spring-boot-resttestclient. Boot 4 only provides it when asked, so the base class adds @AutoConfigureTestRestTemplate.
  • RestTemplateBuilder: moved to org.springframework.boot.restclient.
  • Split starters: RestClient and WebClient come from Boot 4's separate restclient and webclient starters, and AOP from the aspectj starter.
  • Jackson 3: tools.jackson.databind, with asString replacing asText.
  • SentrySpan: comes from sentry-spring-7.
  • open modifiers dropped: this module applies kotlin-spring, which opens Spring-annotated classes anyway.
  • No FeatureFlag test: the Boot 4 sample never had one.

The Spring Boot 4 matrix now runs the suite on every Boot version it covers. The sample keeps KafkaQueueSystemTest until the next PR.

After a coverage audit against the sample's tests:

💡 Motivation and Context

This fans the Spring Boot 3 pilot out to Boot 4. The suite runs 23 tests in about 15s of Gradle time, including Spring startup.

💚 How did you test it?

  • All 23 tests pass on Spring Boot 4.1.0.
  • They also pass with the catalog set to 4.0.0, the matrix's oldest version.
  • Breaking the Todo span's URL makes all four Todo tests fail.
  • :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

Port the Boot 4 sample's Kafka test, retire the sample from the runner and CI, then do the same for Boot 2.

#skip-changelog

Adds an integrationTest suite to sentry-spring-boot-4 that mirrors the
jakarta one and ports the Boot 4 sample's Person, DistributedTracing,
Todo, Cache, Metrics and GraphQL tests to it. The sample's tests were
copies of the jakarta ones, so the suite is too, adjusted for Spring
Boot 4: Jackson 3, the split restclient and resttestclient modules,
@AutoConfigureTestRestTemplate, and sentry-spring-7's SentrySpan.

The Spring Boot 4 matrix runs the suite against every Boot version it
covers. The sample keeps its Kafka test until the next PR.

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
runningcode and others added 2 commits October 20, 2026 20:44
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… Boot 4

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