Skip to content

test(spring-boot): [Sample Tests 14] Move the Boot 2 GraphQL and Kafka tests - #6300

Draft
runningcode wants to merge 2 commits into
no/boot2-integration-testfrom
no/boot2-graphql-kafka-test
Draft

runningcode wants to merge 2 commits into
no/boot2-integration-testfrom
no/boot2-graphql-kafka-test

Conversation

@runningcode

@runningcode runningcode commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

PR Stack (Sample Tests)


📜 Description

Ports the Boot 2 sample's three GraphQL tests and its Kafka test to the integrationTest suite in sentry-spring-boot. They were the sample's last system tests, so this PR also takes the Boot 2 sample off the system-test runner and CI.

Gated on Spring Boot 2.7. Both features need Spring Boot 2.7, but the Spring Boot 2 matrix also covers 2.4 to 2.6. A bootSupportsGraphqlAndKafka flag reads the catalog's Boot 2 version, which the matrix patches. Below 2.7, the suite leaves out the GraphQL and Kafka dependencies and sources, as the sample did with excludeGraphql/excludeKafka.

Kafka runs its own context. The shared base class has to compile without spring-kafka-test on Boot 2.4–2.6, so the broker can't live there as it does for Boot 3 and 4. Instead:

  • KafkaIntegrationTest activates a kafka profile and declares its own @EmbeddedKafka broker, which makes Spring start a second application context. The Kafka beans only exist under that profile.
  • Each context gets its own in-memory database (jdbc:p6spy:hsqldb:mem:${random.uuid}). A first attempt shared one: the second context's schema.sql failed on the existing table, and its failed shutdown closed the global SDK, which broke every later test.
  • The second context re-initializes the global Sentry SDK. The app reaches Sentry through ScopesAdapter, so this is transparent to the first context. I ran a forced order (main context → Kafka → main context) and all 11 tests passed.

Catalog. spring-kafka 2 and the new spring-kafka-test now share a springKafka2 version.

Boot 2 sample retired from system tests:

  • Removes the sample's system-test wiring, including the temporary isFailOnNoMatchingTests from test(spring-boot): [Sample Tests 13] Move the Boot 2 sample's tests into the module #6299. The sample's main-source exclusions for Boot below 2.7 stay.
  • Removes its runner entries.
  • Removes its backend-workflow row. It was the base matrix row, so sentry-samples-spring-boot-opentelemetry-noagent takes its place.
  • Removes the sample's Spring Boot 2 matrix build and test steps.

After a coverage audit against the sample's tests:

💡 Motivation and Context

With this, all three Spring Boot lines run their sample tests in-module:

Module Tests
Boot 2 24
Boot 3 29
Boot 4 25

💚 How did you test it?

  • All 24 tests pass on Spring Boot 2.7.18 and 2.7.0.
  • On 2.4.13, GraphQL and Kafka drop out and the other 16 tests pass.
  • A temporary JUnit suite forced the order main context → Kafka → main context, and all 11 tests in it passed.
  • The slimmed sample still builds.
  • :sentry-spring-boot: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 remaining flavors: WebFlux, OTel without the agent, the agent suites for Boot 2 and 4, the Spring WAR samples, and the console and logging samples.

#skip-changelog

@socket-security

socket-security Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Warning

Socket is a tool Sentry Security team deployed to defend against supply chain attack. Please provide any feedback you have in #discuss-security slack channel ❤️

Priority Alert  (click "▶" to expand/collapse) Action
Critical priority
Critical CVE: Scala subject to file deletion, code execution due to Java deserialization chain with LazyList object deserialization in maven org.scala-lang:scala-library

CVE: GHSA-8qv5-68g4-248j Scala subject to file deletion, code execution due to Java deserialization chain with LazyList object deserialization (CRITICAL)

Affected versions: >= 2.13.0 < 2.13.9

Patched version: 2.13.9

From: gradle/libs.versions.toml → maven/org.springframework.kafka/spring-kafka-test@2.8.11 → maven/org.scala-lang/scala-library@2.13.6

ℹ Read more on: This package | This alert | What is a critical CVE?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Remove or replace dependencies that include known critical CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore maven/org.scala-lang/scala-library@2.13.6. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn

View full report

@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 21, 2026 13:22
…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>
@runningcode
runningcode force-pushed the no/boot2-integration-test branch from b00abe3 to 87fb9af Compare October 21, 2026 11:27
@runningcode
runningcode force-pushed the no/boot2-graphql-kafka-test branch from 2f13c19 to 550a03b Compare October 21, 2026 11:27

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