Skip to content

Commit 7322c79

Browse files
committed
test(spring-boot): Move the Boot 4 OTel no-agent sample's tests into the module
Adds an integrationTestOtelNoAgent suite to sentry-spring-boot-4, the Boot 4 counterpart of the Boot 3 one: the app traces through the OpenTelemetry SDK in its own JVM, set up by sentry-opentelemetry-agentless-spring. The sample's tests were the same as the Boot 3 sample's, minus Cache, so the suite is the Boot 3 one with Boot 4's packages and no Cache test. Its Metrics tests were copies of the servlet ones and don't depend on tracing. The sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 4 matrix, which now runs the new suite. integrationTests includes it too. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent 5d3efce commit 7322c79

29 files changed

Lines changed: 978 additions & 754 deletions

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ jobs:
7373
./gradlew \
7474
:sentry-samples:sentry-samples-spring-boot-4-opentelemetry:bootJar \
7575
:sentry-samples:sentry-samples-spring-boot-4-opentelemetry:testClasses \
76-
:sentry-samples:sentry-samples-spring-boot-4-opentelemetry-noagent:bootJar \
77-
:sentry-samples:sentry-samples-spring-boot-4-opentelemetry-noagent:testClasses \
7876
:sentry-samples:sentry-samples-spring-7:war \
7977
:sentry-samples:sentry-samples-spring-7:testClasses \
8078
:sentry-opentelemetry:sentry-opentelemetry-agent:assemble
@@ -84,6 +82,7 @@ jobs:
8482
./gradlew \
8583
:sentry-spring-boot-4:integrationTest \
8684
:sentry-spring-boot-4:integrationTestWebflux \
85+
:sentry-spring-boot-4:integrationTestOtelNoAgent \
8786
:sentry-spring-boot-4:integrationTestLog4j2
8887
8988
- name: Run sentry-samples-spring-boot-4-opentelemetry agent init true
@@ -100,13 +99,6 @@ jobs:
10099
--agent true \
101100
--auto-init "false"
102101
103-
- name: Run sentry-samples-spring-boot-4-opentelemetry-noagent
104-
run: |
105-
python3 test/system-test-runner.py test \
106-
--module "sentry-samples-spring-boot-4-opentelemetry-noagent" \
107-
--agent false \
108-
--auto-init "true"
109-
110102
- name: Run sentry-samples-spring-7
111103
run: |
112104
python3 test/system-test-runner.py test \

‎.github/workflows/system-tests-backend.yml‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@ jobs:
5252
- sample: "sentry-samples-jul"
5353
agent: "false"
5454
agent-auto-init: "true"
55-
- sample: "sentry-samples-spring-boot-4-opentelemetry-noagent"
56-
agent: "false"
57-
agent-auto-init: "true"
5855
- sample: "sentry-samples-spring-boot-4-opentelemetry"
5956
agent: "true"
6057
agent-auto-init: "true"

‎build.gradle.kts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ tasks.register("integrationTests") {
232232
":sentry-spring-boot-jakarta:integrationTestOtelAgent",
233233
":sentry-spring-boot-4:integrationTest",
234234
":sentry-spring-boot-4:integrationTestWebflux",
235+
":sentry-spring-boot-4:integrationTestOtelNoAgent",
235236
":sentry-spring-boot-4:integrationTestLog4j2",
236237
)
237238
}

‎sentry-samples/sentry-samples-spring-boot-4-opentelemetry-noagent/build.gradle.kts‎

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ plugins {
66
alias(libs.plugins.spring.dependency.management)
77
alias(libs.plugins.kotlin.jvm)
88
alias(libs.plugins.kotlin.spring)
9-
id("io.sentry.systemtest")
109
}
1110

1211
group = "io.sentry.sample.spring-boot-4"
@@ -54,36 +53,6 @@ dependencies {
5453
// database query tracing
5554
implementation(projects.sentryJdbc)
5655
runtimeOnly(libs.hsqldb)
57-
58-
testImplementation(kotlin(Config.kotlinStdLib))
59-
testImplementation(projects.sentrySystemTestSupport)
60-
testImplementation(libs.apollo3.kotlin)
61-
testImplementation(libs.kotlin.test.junit)
62-
testImplementation(libs.slf4j2.api)
63-
testImplementation(libs.springboot4.starter.test) {
64-
exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
65-
}
66-
testImplementation("ch.qos.logback:logback-classic:1.5.16")
67-
testImplementation("ch.qos.logback:logback-core:1.5.16")
6856
}
6957

7058
dependencyManagement { imports { mavenBom(libs.otel.instrumentation.bom.get().toString()) } }
71-
72-
tasks.register<Test>("systemTest").configure {
73-
group = "verification"
74-
description = "Runs the System tests"
75-
76-
val test = project.extensions.getByType<SourceSetContainer>()["test"]
77-
testClassesDirs = test.output.classesDirs
78-
classpath = test.runtimeClasspath
79-
80-
maxParallelForks = 1
81-
82-
filter { includeTestsMatching("io.sentry.systemtest*") }
83-
}
84-
85-
tasks.named("test").configure {
86-
require(this is Test)
87-
88-
filter { excludeTestsMatching("io.sentry.systemtest.*") }
89-
}

‎sentry-samples/sentry-samples-spring-boot-4-opentelemetry-noagent/src/test/kotlin/io/sentry/DummyTest.kt‎

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

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

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

‎sentry-samples/sentry-samples-spring-boot-4-opentelemetry-noagent/src/test/kotlin/io/sentry/systemtest/GraphqlGreetingSystemTest.kt‎

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

0 commit comments

Comments
 (0)