Skip to content

Commit eb6e689

Browse files
runningcodeclaude
andcommitted
test(spring-boot): Move the Boot 2 sample's tests into the module
Adds an integrationTest suite to sentry-spring-boot that mirrors the jakarta one and ports the Boot 2 sample's Person, DistributedTracing, Todo, Cache and Metrics tests to it. Spring Boot 2 has no RestClient, so the tracing forwards through RestTemplate and Todo covers three clients, and WebClient is called on the request thread because Reactor 3.4 lacks automatic context propagation. The Person test is the jakarta one, which also checks the logged error and a span's feature flag that the Boot 2 sample never asserted. The Spring Boot 2 matrix runs the suite from 2.4 to 2.7. Below 2.7 the sample's remaining GraphQL and Kafka tests are excluded, so its systemTest no longer fails on finding none. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent 09a1818 commit eb6e689

20 files changed

Lines changed: 697 additions & 460 deletions

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ jobs:
8787
:sentry-samples:sentry-samples-spring:testClasses \
8888
:sentry-opentelemetry:sentry-opentelemetry-agent:assemble
8989
90+
- name: Test sentry-spring-boot integration suite
91+
run: ./gradlew :sentry-spring-boot:integrationTest
92+
9093
- name: Test sentry-samples-spring-boot
9194
run: |
9295
python3 test/system-test-runner.py test \

‎sentry-samples/sentry-samples-spring-boot/build.gradle.kts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ tasks.register<Test>("systemTest").configure {
154154
if (!includeKafka) {
155155
excludeTestsMatching("io.sentry.systemtest.Kafka*")
156156
}
157+
// The other tests moved into sentry-spring-boot, so without GraphQL and Kafka none are left.
158+
isFailOnNoMatchingTests = includeGraphql || includeKafka
157159
}
158160
}
159161

‎sentry-samples/sentry-samples-spring-boot/src/test/kotlin/io/sentry/systemtest/CacheSystemTest.kt‎

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

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

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

‎sentry-samples/sentry-samples-spring-boot/src/test/kotlin/io/sentry/systemtest/MetricsSystemTest.kt‎

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

0 commit comments

Comments
 (0)