Skip to content

Commit

Permalink
Fix tests for junit 5.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
DreierF committed Feb 24, 2025
1 parent f560506 commit b13adf7
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ val libs = catalogs.named("libs")
fun lib(alias: String) = libs.findLibrary(alias).get()

dependencies {
testImplementation(lib("junit-jupiter-api"))
testImplementation(platform(lib("junit-bom")))
testImplementation(lib("junit-jupiter"))
testImplementation(lib("assertj"))
testImplementation(lib("mockito-core"))
testImplementation(lib("mockito-junit"))
testImplementation(lib("mockito-kotlin"))

testRuntimeOnly(lib("junit-platform-launcher"))
testRuntimeOnly(lib("junit-jupiter-engine"))

constraints {
implementation("org.apache.commons:commons-compress:1.27.1")
Expand Down
14 changes: 6 additions & 8 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ jacoco = "0.8.12"
# We need to stay on the 1.3.x release line as 1.4.x requires Java 11
logback = "1.3.15"
retrofit = "2.11.0"
junit = "5.12.0"
junitPlatform = "1.12.0"
okhttp = "4.12.0"
mockito = "5.15.2"
mockitoKotlin = "5.4.0"
Expand Down Expand Up @@ -64,12 +62,12 @@ jna-platform = { module = "net.java.dev.jna:jna-platform", version = "5.16.0" }

log4j-core = { module = "org.apache.logging.log4j:log4j-core", version = "2.24.3" }

junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit" }
junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit" }
junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "junit" }
junit-platform-launcher = { module = "org.junit.platform:junit-platform-launcher", version.ref = "junitPlatform" }
junit-platform-engine = { module = "org.junit.platform:junit-platform-engine", version.ref = "junitPlatform" }
junit-platform-commons = { module = "org.junit.platform:junit-platform-commons", version.ref = "junitPlatform" }
junit-bom = { module = "org.junit:junit-bom", version = "5.12.0" }
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter" }
junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params" }
junit-platform-launcher = { module = "org.junit.platform:junit-platform-launcher" }
junit-platform-engine = { module = "org.junit.platform:junit-platform-engine" }
junit-platform-commons = { module = "org.junit.platform:junit-platform-commons" }

junit4 = { module = "junit:junit", version = "4.13.2" }
assertj = { module = "org.assertj:assertj-core", version = "3.27.3" }
Expand Down
1 change: 1 addition & 0 deletions impacted-test-engine/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ publishAs {
}

dependencies {
implementation(platform(libs.junit.bom))
implementation(project(":teamscale-client"))
implementation(project(":report-generator"))
implementation(project(":tia-client"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ plugins {

import com.teamscale.TestImpacted

ext.junit4Version = '4.13.2'
ext.junitVintageVersion = '5.12.0'
ext.junitPlatformVersion = '1.4.0'
ext.junitJupiterVersion = '5.12.0'

if (!project.hasProperty("withoutServerConfig")) {
teamscale {
server {
Expand Down Expand Up @@ -82,14 +77,14 @@ repositories {
}

dependencies {
// JUnit Jupiter API and TestEngine implementation
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}")
testImplementation("org.junit.jupiter:junit-jupiter-params:${junitJupiterVersion}")
// JUnit Jupiter
testImplementation(platform("org.junit:junit-bom:5.12.0"))
testImplementation("org.junit.jupiter:junit-jupiter")

// If you also want to support JUnit 3 and JUnit 4 tests
testImplementation("junit:junit:${junit4Version}")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:${junitVintageVersion}")
testImplementation("junit:junit:4.13.2")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}


1 change: 0 additions & 1 deletion teamscale-maven-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,5 @@ dependencies {
implementation(libs.jgit)
implementation(libs.teamscaleLibCommons)

testImplementation(libs.junit.jupiter.api)
testImplementation(libs.assertj)
}
1 change: 1 addition & 0 deletions tia-runlisteners/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ tasks.jar {

dependencies {
implementation(project(":tia-client"))
implementation(platform(libs.junit.bom))
api(libs.junit4)
api(libs.junit.platform.launcher)
}

0 comments on commit b13adf7

Please sign in to comment.