Skip to content

Commit 77789d8

Browse files
committed
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 4b82f23 commit 77789d8

20 files changed

Lines changed: 710 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
@@ -153,6 +153,8 @@ tasks.register<Test>("systemTest").configure {
153153
if (!includeKafka) {
154154
excludeTestsMatching("io.sentry.systemtest.Kafka*")
155155
}
156+
// The other tests moved into sentry-spring-boot, so without GraphQL and Kafka none are left.
157+
isFailOnNoMatchingTests = includeGraphql || includeKafka
156158
}
157159
}
158160

‎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)