Skip to content

test(spring-boot): [Sample Tests 9] Move the Boot 3 GraphQL tests into the module - #6295

Merged
runningcode merged 2 commits into
mainfrom
no/boot-jakarta-graphql-test
Oct 23, 2026
Merged

runningcode merged 2 commits into
mainfrom
no/boot-jakarta-graphql-test

Conversation

@runningcode

@runningcode runningcode commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

PR Stack (Sample Tests)


📜 Description

Ports the jakarta sample's GraphqlGreetingSystemTest, GraphqlProjectSystemTest and GraphqlTaskSystemTest to the integrationTest suite in sentry-spring-boot-jakarta, and deletes them from the sample. Each request's transaction must contain the matching graphql span:

  • a query, a query with a schema mapping, and a mutation;
  • a resolver error and a mutation error. Each is reported with its own transaction.
  • fields loaded through a @BatchMapping and through a registered DataLoader. The transaction has spans for Task.assignee and Task.creator.

How it differs from the sample:

  • No Apollo client: requests are plain JSON POSTs to /graphql. That removes the Apollo and OkHttp 4 dependencies these tests needed through sentry-system-test-support.
  • Errors tied to their requests: each error event is matched by its original exception message and linked to its transaction by trace ID. This keeps the two error tests apart on the shared mock server, and checks that each error belongs to its own request's transaction. A deliberately wrong expected span makes the test fail.
  • Trimmed schema: it keeps only what the tests use. The sample's subscription and its unused crash triggers are gone.

After this PR, the jakarta sample has one system test left: KafkaQueueSystemTest.

After a coverage audit against the sample's tests:

  • The task query also checks assigneeId and creatorId, which the sample asserted.

💡 Motivation and Context

This continues the Spring Boot 3 pilot. The suite now runs 27 tests in about 6s.

💚 How did you test it?

  • All 27 suite tests pass on Spring Boot 3.5.0.
  • They also pass with the catalog set to 3.2.12, the matrix's oldest version.
  • Expecting the wrong span on the mutation error's transaction makes that test fail.
  • :sentry-spring-boot-jakarta: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 KafkaQueueSystemTest using EmbeddedKafka. The jakarta sample then has no tests, and it can come off the system-test runner and workflows.

#skip-changelog

@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.1 (1) release

⚙️ sentry-android Build Distribution Settings

This was referenced Oct 20, 2026
@runningcode
runningcode force-pushed the no/boot-jakarta-cache-metrics-flags-test branch from fb628cd to 896122f Compare October 21, 2026 09:19
@runningcode
runningcode force-pushed the no/boot-jakarta-graphql-test branch from 38bbcd5 to 5379114 Compare October 21, 2026 09:19
@runningcode
runningcode force-pushed the no/boot-jakarta-cache-metrics-flags-test branch from 896122f to c59a493 Compare October 21, 2026 11:27
@runningcode
runningcode force-pushed the no/boot-jakarta-graphql-test branch from 5379114 to 429aa76 Compare October 21, 2026 11:27
@runningcode
runningcode force-pushed the no/boot-jakarta-cache-metrics-flags-test branch from c59a493 to 9c1875a Compare October 22, 2026 12:40
@runningcode
runningcode force-pushed the no/boot-jakarta-graphql-test branch 2 times, most recently from 3c3957f to 830cd05 Compare October 22, 2026 13:31
@runningcode
runningcode force-pushed the no/boot-jakarta-cache-metrics-flags-test branch 2 times, most recently from 47f46a0 to 55f949b Compare October 22, 2026 14:02
@runningcode
runningcode force-pushed the no/boot-jakarta-graphql-test branch from 830cd05 to 3269abc Compare October 22, 2026 14:02
@runningcode
runningcode marked this pull request as ready for review October 22, 2026 14:34
@runningcode runningcode added the ship-it PR is ready to merge from a reviewer perspective label Oct 22, 2026
@runningcode
runningcode force-pushed the no/boot-jakarta-graphql-test branch from 3269abc to 87dd655 Compare October 22, 2026 16:02
@runningcode
runningcode force-pushed the no/boot-jakarta-cache-metrics-flags-test branch from 55f949b to 3c4da5a Compare October 22, 2026 16:02
@runningcode
runningcode force-pushed the no/boot-jakarta-graphql-test branch from 87dd655 to daf0729 Compare October 23, 2026 08:24
@runningcode
runningcode force-pushed the no/boot-jakarta-cache-metrics-flags-test branch 2 times, most recently from 57716e0 to f7b8dbc Compare October 23, 2026 08:58
@runningcode
runningcode force-pushed the no/boot-jakarta-graphql-test branch from daf0729 to 9882327 Compare October 23, 2026 08:58
Base automatically changed from no/boot-jakarta-cache-metrics-flags-test to main October 23, 2026 09:25
Ports the jakarta sample's three GraphQL system tests to the
integrationTest suite as plain JSON requests, so they no longer need
the Apollo client: queries, a schema mapping, a mutation, resolver
errors, and fields loaded through a batch mapping and a data loader.

Errors are matched by their exception and tied to their transaction by
trace ID, which both keeps two error tests apart on the shared server
and checks that the error belongs to its request's transaction.

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

The sample's test asserted assigneeId and creatorId, which the query
requests but the port didn't check.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@runningcode
runningcode force-pushed the no/boot-jakarta-graphql-test branch from 9882327 to d003698 Compare October 23, 2026 09:35
@runningcode
runningcode enabled auto-merge (squash) October 23, 2026 09:39
@runningcode
runningcode merged commit 798c4c5 into main Oct 23, 2026
69 checks passed
@runningcode
runningcode deleted the no/boot-jakarta-graphql-test branch October 23, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ship-it PR is ready to merge from a reviewer perspective

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants