Repository navigation
Conversation
📲 Install BuildsAndroid
|
romtsn
marked this pull request as ready for review
October 27, 2026 13:22
romtsn
requested review from
0xadam-brown,
adinauer,
markushi and
runningcode
as code owners
October 27, 2026 13:22
runningcode
force-pushed
the
romtsn/test/sample-tests-followups
branch
from
October 27, 2026 14:33
cc62544 to
c0d347b
Compare
runningcode
force-pushed
the
no/spring-boot-oldest-compile-check
branch
from
October 27, 2026 14:33
d2dac4e to
25c20ff
Compare
Fix issues the review of the sample tests stack found in the new in-module end-to-end tests: - MockSentryServer keeps the error when it can't read a body and rethrows it while waiting, so a serialization bug no longer looks like a missing envelope. - ChildJvmApp only takes a port that two reads agree on. A partly written port such as "54" of "54321" parsed and pointed the test at the wrong port. - The agentless test starts a span through the OpenTelemetry API and checks that it reaches Sentry. Before, it passed with the OpenTelemetry wiring broken. - The Person tests use id 11 and match their transaction by URL, so envelopes from the tracing tests' /person/1 calls can't satisfy them. - The Boot 2 Kafka test shares the suite's context and broker, as on Boot 3 and 4. Its second context re-ran Sentry.init and made later tests depend on the run order. Boot 2.4 to 2.6 were the reason for the split and are gone. - Tests fail clearly when a system property the Gradle task sets is missing, rather than running with -javaagent:null. - Remove the Boot 2 version gating from the samples, the runner's files from .gitignore, and the unused jackson-kotlin entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
runningcode
force-pushed
the
romtsn/test/sample-tests-followups
branch
from
October 27, 2026 15:08
c0d347b to
899abf7
Compare
runningcode
force-pushed
the
no/spring-boot-oldest-compile-check
branch
from
October 27, 2026 15:08
25c20ff to
8eb9829
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)The earlier stack PRs (#6266 to #6332) are merged.
📜 Description
This fixes issues that a review of the merged Sample Tests stack found in the new end-to-end tests. Each issue came from the stack itself; none existed before it.
MockSentryServersurfaces bodies it can't read. Before, a deserialization error left the handler with no trace, and the test only failed on its timeout ("received N envelopes"). The server now answers 500, keeps the error, andawaitEnvelope/assertNoEnveloperethrow it as the cause.ChildJvmApp.awaitPortwaits for a stable port. Neither Spring Boot'sWebServerPortFileWriternorHelloServerwrites the file atomically, and a partial read such as"54"of"54321"parses. The port now counts only when two reads agree.AgentlessEndToEndTestchecks the OpenTelemetry wiring. Before, it only used the Sentry API, so it passed when the span factory fell back to the default one. It now starts a span throughGlobalOpenTelemetryand asserts that the span arrives as a Sentry transaction with the same trace ID.DistributedTracingIntegrationTestcalls/tracing/1, which calls/person/1and sends the sameid=1event, error andGET /person/{id}transaction thatPersonIntegrationTestwaits for. The Person tests now use id 11, as the Spring WAR suites do, and match their transaction by request URL.Sentry.initagain and replaced the first context's options, which made later test classes depend on the run order. The split existed because Boot 2.4 to 2.6 had no Kafka support, and test(spring-boot): [Sample Tests 41] Drop Spring Boot 2.4 to 2.6 from the test matrix #6381 dropped them. Boot 2 now has the same setup as Boot 3 and 4:@EmbeddedKafkaon the shared base class and nokafkaprofile. The${random.uuid}datasource workaround is gone too.-javaagent:nullor silently chose the starter init mode. The new helperrequiredTestPropertynames the missing property.excludeGraphql/excludeKafka,springBoot2Supports*) from the 4 Boot 2 samples. test(spring-boot): [Sample Tests 41] Drop Spring Boot 2.4 to 2.6 from the test matrix #6381 made it dead code..gitignore.jackson-kotlincatalog entry.testskill now runs integration suites when it gets only a module name.💡 Motivation and Context
These are follow-ups from a review of the Sample Tests stack (#6266 to #6332).
I left these out on purpose:
JavaContinuousProfilerTesthas no guard either.ChildJvmAppKDoc says this is intended, so that Gradle's report shows the app log with the test.sentry.traces-sample-rate=1.0together with OTLP. The open question from test(spring-boot): [Sample Tests 37] Move the Boot 4 OTLP sample's tests into the module #6329 still needs an answer.💚 How did you test it?
I ran these with JDK 21, and all 205 tests passed:
:sentry-test-support:test, which includes a new test that posts a body that is not an envelope:sentry-opentelemetry:sentry-opentelemetry-agentless:testand:sentry-opentelemetry:sentry-opentelemetry-agent:test:sentry-spring-boot:integrationTest,integrationTestOtelNoAgentandintegrationTestOtelAgent:sentry-spring-boot-jakarta:integrationTestandintegrationTestOtelAgentWithoutAutoInit:sentry-spring-boot-4:integrationTest,integrationTestOtlpandintegrationTestOtelNoAgentI also compiled the 4 changed Boot 2 samples (
compileKotlin).📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
None.
#skip-changelog
🤖 Generated with Claude Code