Skip to content

Commit 393829a

Browse files
committed
test(spring-boot): Move the Boot 4 WebFlux sample's tests into the module
Adds an integrationTestWebflux suite to sentry-spring-boot-4 that mirrors the Boot 3 one, adjusted for Spring Boot 4: the webclient starter for WebClient.Builder, the restclient starter that TestRestTemplate needs, Jackson 3, and @AutoConfigureTestRestTemplate. The Todo test reads the port with @LocalServerPort because TestRestTemplate's root URI doesn't hold the port on Boot 4.0. The Boot 4 WebFlux 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. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent 1f31f97 commit 393829a

20 files changed

Lines changed: 493 additions & 541 deletions

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

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ jobs:
7171
- name: Build sample artifacts
7272
run: |
7373
./gradlew \
74-
:sentry-samples:sentry-samples-spring-boot-4-webflux:bootJar \
75-
:sentry-samples:sentry-samples-spring-boot-4-webflux:testClasses \
7674
:sentry-samples:sentry-samples-spring-boot-4-opentelemetry:bootJar \
7775
:sentry-samples:sentry-samples-spring-boot-4-opentelemetry:testClasses \
7876
:sentry-samples:sentry-samples-spring-boot-4-opentelemetry-noagent:bootJar \
@@ -81,15 +79,12 @@ jobs:
8179
:sentry-samples:sentry-samples-spring-7:testClasses \
8280
:sentry-opentelemetry:sentry-opentelemetry-agent:assemble
8381
84-
- name: Test sentry-spring-boot-4 integration suite
85-
run: ./gradlew :sentry-spring-boot-4:integrationTest :sentry-spring-boot-4:integrationTestLog4j2
86-
87-
- name: Run sentry-samples-spring-boot-4-webflux
82+
- name: Test sentry-spring-boot-4 integration suites
8883
run: |
89-
python3 test/system-test-runner.py test \
90-
--module "sentry-samples-spring-boot-4-webflux" \
91-
--agent false \
92-
--auto-init "true"
84+
./gradlew \
85+
:sentry-spring-boot-4:integrationTest \
86+
:sentry-spring-boot-4:integrationTestWebflux \
87+
:sentry-spring-boot-4:integrationTestLog4j2
9388
9489
- name: Run sentry-samples-spring-boot-4-opentelemetry agent init true
9590
run: |

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ jobs:
5858
- sample: "sentry-samples-jul"
5959
agent: "false"
6060
agent-auto-init: "true"
61-
- sample: "sentry-samples-spring-boot-4-webflux"
62-
agent: "false"
63-
agent-auto-init: "true"
6461
- sample: "sentry-samples-spring-boot-4-opentelemetry-noagent"
6562
agent: "false"
6663
agent-auto-init: "true"

‎sentry-samples/sentry-samples-spring-boot-4-webflux/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-webflux"
@@ -30,17 +29,6 @@ dependencies {
3029
// cache tracing
3130
implementation(libs.springboot4.starter.cache)
3231
implementation(libs.caffeine)
33-
34-
testImplementation(kotlin(Config.kotlinStdLib))
35-
testImplementation(projects.sentrySystemTestSupport)
36-
testImplementation(libs.apollo3.kotlin)
37-
testImplementation(libs.kotlin.test.junit)
38-
testImplementation(libs.slf4j2.api)
39-
testImplementation(libs.springboot4.starter.test) {
40-
exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
41-
}
42-
testImplementation("ch.qos.logback:logback-classic:1.5.16")
43-
testImplementation("ch.qos.logback:logback-core:1.5.16")
4432
}
4533

4634
tasks.withType<KotlinCompile>().configureEach {
@@ -53,22 +41,3 @@ tasks.withType<KotlinCompile>().configureEach {
5341
compilerOptions.apiVersion = org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_1_9
5442
}
5543
}
56-
57-
tasks.register<Test>("systemTest").configure {
58-
group = "verification"
59-
description = "Runs the System tests"
60-
61-
val test = project.extensions.getByType<SourceSetContainer>()["test"]
62-
testClassesDirs = test.output.classesDirs
63-
classpath = test.runtimeClasspath
64-
65-
maxParallelForks = 1
66-
67-
filter { includeTestsMatching("io.sentry.systemtest*") }
68-
}
69-
70-
tasks.named("test").configure {
71-
require(this is Test)
72-
73-
filter { excludeTestsMatching("io.sentry.systemtest.*") }
74-
}

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

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

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

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

‎sentry-samples/sentry-samples-spring-boot-4-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-4-webflux/src/test/kotlin/io/sentry/systemtest/GraphqlGreetingSystemTest.kt‎

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

0 commit comments

Comments
 (0)