Skip to content

Commit 8efa515

Browse files
committed
test(spring-boot): Port the Boot 3 OTel agent sample's Person, tracing and Todo tests
The agent tests now start the fixture app once per test JVM and share it, because it takes seconds to start. Which mode initializes Sentry is a property of the test task, so the suite's task runs with the agent initializing it and a new integrationTestOtelAgentWithoutAutoInit task runs the same tests with the Spring Boot starter doing it. Gradle runs the two in parallel. The fixture gains the Person POST, distributed tracing and Todo endpoints, and the suite ports the agent sample's Person, DistributedTracing and Todo tests. Sentry exports the agent's spans in batches every 5 seconds, which can't be configured, so each test waits for the next batch and the negative tracing check waits past one. ChildJvmApp now copies the app's output into the test's as it arrives instead of printing it on close. The shared app is closed when the JVM exits, where its whole log would otherwise land on the console. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent ead5c63 commit 8efa515

17 files changed

Lines changed: 636 additions & 569 deletions

File tree

‎.github/workflows/spring-boot-3-matrix.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ jobs:
8484
:sentry-spring-boot-jakarta:integrationTestWebflux \
8585
:sentry-spring-boot-jakarta:integrationTestOtelNoAgent \
8686
:sentry-spring-boot-jakarta:integrationTestLog4j2 \
87-
:sentry-spring-boot-jakarta:integrationTestOtelAgent
87+
:sentry-spring-boot-jakarta:integrationTestOtelAgent \
88+
:sentry-spring-boot-jakarta:integrationTestOtelAgentWithoutAutoInit
8889
8990
- name: Test sentry-samples-spring-boot-jakarta-opentelemetry agent init true
9091
run: |

‎sentry-samples/sentry-samples-spring-boot-jakarta-opentelemetry/src/test/kotlin/io/sentry/systemtest/DistributedTracingSystemTest.kt‎

Lines changed: 0 additions & 197 deletions
This file was deleted.

‎sentry-samples/sentry-samples-spring-boot-jakarta-opentelemetry/src/test/kotlin/io/sentry/systemtest/PersonSystemTest.kt‎

Lines changed: 0 additions & 169 deletions
This file was deleted.

0 commit comments

Comments
 (0)