Skip to content

Commit 00a731e

Browse files
committed
test(spring-boot): Move the Boot 2 WebFlux sample's tests into the module
Adds an integrationTestWebflux suite to sentry-spring-boot that mirrors the Boot 3 one, without the Reactor thread-local accessor that Spring Boot 2's Reactor lacks. The GraphQL greeting lives in its own file so the suite can leave it out below Spring Boot 2.7, like the servlet suite's GraphQL. The Boot 2 WebFlux sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 2 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 3a815e4 commit 00a731e

21 files changed

Lines changed: 486 additions & 499 deletions

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

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ jobs:
7575
- name: Build sample artifacts
7676
run: |
7777
./gradlew \
78-
:sentry-samples:sentry-samples-spring-boot-webflux:shadowJar \
79-
:sentry-samples:sentry-samples-spring-boot-webflux:testClasses \
8078
:sentry-samples:sentry-samples-spring-boot-opentelemetry:shadowJar \
8179
:sentry-samples:sentry-samples-spring-boot-opentelemetry:testClasses \
8280
:sentry-samples:sentry-samples-spring-boot-opentelemetry-noagent:shadowJar \
@@ -85,15 +83,8 @@ jobs:
8583
:sentry-samples:sentry-samples-spring:testClasses \
8684
:sentry-opentelemetry:sentry-opentelemetry-agent:assemble
8785
88-
- name: Test sentry-spring-boot integration suite
89-
run: ./gradlew :sentry-spring-boot:integrationTest
90-
91-
- name: Test sentry-samples-spring-boot-webflux
92-
run: |
93-
python3 test/system-test-runner.py test \
94-
--module "sentry-samples-spring-boot-webflux" \
95-
--agent false \
96-
--auto-init "true"
86+
- name: Test sentry-spring-boot integration suites
87+
run: ./gradlew :sentry-spring-boot:integrationTest :sentry-spring-boot:integrationTestWebflux
9788

9889
- name: Test sentry-samples-spring-boot-opentelemetry agent init true
9990
run: |

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ jobs:
3434
- sample: "sentry-samples-spring-boot-opentelemetry"
3535
agent: "true"
3636
agent-auto-init: "false"
37-
- sample: "sentry-samples-spring-boot-webflux"
38-
agent: "false"
39-
agent-auto-init: "true"
4037
- sample: "sentry-samples-spring-boot-jakarta-opentelemetry-noagent"
4138
agent: "false"
4239
agent-auto-init: "true"

‎build.gradle.kts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ tasks.register("integrationTests") {
224224
description = "Runs the integration test suites of every module."
225225
dependsOn(
226226
":sentry-spring-boot:integrationTest",
227+
":sentry-spring-boot:integrationTestWebflux",
227228
":sentry-spring-boot-jakarta:integrationTest",
228229
":sentry-spring-boot-jakarta:integrationTestWebflux",
229230
":sentry-spring-boot-jakarta:integrationTestLog4j2",

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

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ plugins {
77
alias(libs.plugins.shadow)
88
alias(libs.plugins.kotlin.jvm)
99
alias(libs.plugins.kotlin.spring)
10-
id("io.sentry.systemtest")
1110
}
1211

1312
// Spring scans this app's own bytecode with its repackaged ASM at startup, and the oldest version
@@ -51,18 +50,6 @@ dependencies {
5150
implementation(projects.sentryGraphql)
5251
}
5352
implementation(projects.sentryAsyncProfiler)
54-
55-
testImplementation(kotlin(Config.kotlinStdLib))
56-
testImplementation(projects.sentrySystemTestSupport)
57-
testImplementation(libs.apollo3.kotlin)
58-
testImplementation(libs.kotlin.test.junit)
59-
testImplementation(libs.slf4j2.api)
60-
testImplementation(libs.springboot.starter.test) {
61-
exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
62-
}
63-
testImplementation("ch.qos.logback:logback-classic:1.5.16")
64-
testImplementation("ch.qos.logback:logback-core:1.5.16")
65-
testImplementation("org.apache.httpcomponents:httpclient")
6653
}
6754

6855
val runtimeClasspath = configurations.named("runtimeClasspath")
@@ -101,27 +88,3 @@ tasks.withType<KotlinCompile>().configureEach {
10188
compilerOptions.freeCompilerArgs = listOf("-Xjsr305=strict")
10289
}
10390
}
104-
105-
tasks.register<Test>("systemTest").configure {
106-
group = "verification"
107-
description = "Runs the System tests"
108-
109-
val test = project.extensions.getByType<SourceSetContainer>()["test"]
110-
testClassesDirs = test.output.classesDirs
111-
classpath = test.runtimeClasspath
112-
113-
maxParallelForks = 1
114-
115-
filter {
116-
includeTestsMatching("io.sentry.systemtest*")
117-
if (!includeGraphql) {
118-
excludeTestsMatching("io.sentry.systemtest.Graphql*")
119-
}
120-
}
121-
}
122-
123-
tasks.named("test").configure {
124-
require(this is Test)
125-
126-
filter { excludeTestsMatching("io.sentry.systemtest.*") }
127-
}

‎sentry-samples/sentry-samples-spring-boot-webflux/src/test/kotlin/io/sentry/DummyTest.kt‎

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

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

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

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

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

0 commit comments

Comments
 (0)