Skip to content

Commit bd8aa73

Browse files
committed
chore: polish tests; fail if test discovery finds problems
1 parent 48632a9 commit bd8aa73

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

core/cas-server-core-util-api/src/test/java/org/apereo/cas/util/spring/boot/ConditionalOnMatchingHostnameTests.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
package org.apereo.cas.util.spring.boot;
22

3+
import org.apereo.cas.test.CasTestExtension;
34
import org.apereo.cas.util.InetAddressUtils;
45

56
import org.junit.jupiter.api.AfterEach;
67
import org.junit.jupiter.api.BeforeAll;
78
import org.junit.jupiter.api.Tag;
89
import org.junit.jupiter.api.Test;
10+
import org.junit.jupiter.api.extension.ExtendWith;
911
import org.springframework.boot.WebApplicationType;
1012
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
1113
import org.springframework.boot.builder.SpringApplicationBuilder;
@@ -25,6 +27,7 @@
2527
* @since 6.4.0
2628
*/
2729
@Tag("Simple")
30+
@ExtendWith(CasTestExtension.class)
2831
class ConditionalOnMatchingHostnameTests {
2932

3033
private static String HOSTNAME;

gradle/dependencies.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1636,8 +1636,6 @@ ext.libraries = [
16361636
},
16371637
dependencies.create(libs.junit.platform.launcher.get()) {
16381638
},
1639-
dependencies.create(libs.junit.platform.runner.get()) {
1640-
},
16411639
dependencies.create(libs.awaitility.get()) {
16421640
exclude(group: "org.hamcrest", module: "hamcrest")
16431641
exclude(group: "junit", module: "junit")

gradle/libs.versions.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,6 @@ junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params", vers
476476
junit-pioneer = { module = "org.junit-pioneer:junit-pioneer", version.ref = "junitPioneer" }
477477
junit-platform-engine = { module = "org.junit.platform:junit-platform-engine", version.ref = "junitPlatform" }
478478
junit-platform-launcher = { module = "org.junit.platform:junit-platform-launcher", version.ref = "junitPlatform" }
479-
junit-platform-runner = { module = "org.junit.platform:junit-platform-runner", version.ref = "junitPlatform" }
480479
junit-platform-suite-api = { module = "org.junit.platform:junit-platform-suite-api", version.ref = "junitPlatform" }
481480
kafka-clients = { module = "org.apache.kafka:kafka-clients", version.ref = "kafka" }
482481
kafka-streams = { module = "org.apache.kafka:kafka-streams", version.ref = "kafka" }

gradle/tests.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,8 @@ TestCategories.values().each({ testCategory ->
210210
}
211211
logger.info "Predictive test selection for ${project.name} with task ${taskName} is ${ptsEnabled ? 'enabled' : 'disabled'}."
212212

213+
systemProperty("junit.platform.discovery.issue.severity.critical", "info")
214+
213215
if (testCategory.parallelEnabled) {
214216
systemProperty("junit.jupiter.execution.parallel.enabled", true)
215217
systemProperty("junit.jupiter.execution.parallel.mode.default", "concurrent")

0 commit comments

Comments
 (0)