Skip to content

Commit

Permalink
Update TestNG to 7.10.1
Browse files Browse the repository at this point in the history
Issue: #116
  • Loading branch information
marcphilipp committed Apr 9, 2024
1 parent e25a980 commit 21f80fb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
:junit-platform-version: 1.8.2
:surefire-version: 3.0.0-M7
:testng-min-version: 6.14.3
:testng-max-version: 7.9.0
:testng-max-version: 7.10.1
:testng-engine-version: 1.0.5

Allows executing https://testng.org[TestNG] tests on the JUnit Platform
Expand Down
11 changes: 6 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,16 @@ val supportedTestNGVersions = listOf(
"7.6.1" to 11,
"7.7.1" to 11,
"7.8.0" to 11,
"7.9.0" to 11 // Keep in sync with TestContext.java and README.MD
"7.9.0" to 11,
"7.10.1" to 11, // Keep in sync with TestContext.java and README.adoc
).associateBy({ Version(it.first) }, { JavaLanguageVersion.of(it.second) })

val lastJdk8CompatibleRelease = supportedTestNGVersions.entries.last { it.value == JavaLanguageVersion.of(8) }.key

val snapshotTestNGVersion = Version("7.10.0-SNAPSHOT")
val snapshotTestNGVersion = Version("7.11.0-SNAPSHOT")

val allTestNGVersions = supportedTestNGVersions.keys + listOf(snapshotTestNGVersion)

fun versionSuffix(version: String) =
if (version.endsWith("-SNAPSHOT")) "snapshot" else version.replace('.', '_')

val testRuntimeClasspath: Configuration by configurations.getting
val testNGTestConfigurationsByVersion = allTestNGVersions.associateWith { version ->
configurations.create("testRuntimeClasspath_${version.suffix}") {
Expand Down Expand Up @@ -211,6 +209,7 @@ tasks {
}
systemProperty("testng.version", version.value)
systemProperty("java.util.logging.manager", "org.apache.logging.log4j.jul.LogManager")
ignoreFailures = version.isSnapshot() // TODO remove this line once a new 7.11.0-SNAPSHOT artifact is available
}
}
test {
Expand Down Expand Up @@ -301,5 +300,7 @@ data class Version(val value: String) {
value.replace(pattern, "_")
}

fun isSnapshot() : Boolean = value.endsWith("-SNAPSHOT")

override fun toString() = value
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
class TestContext {

static ComparableVersion testNGVersion() {
return new ComparableVersion(removeEnd(System.getProperty("testng.version", "7.9.0"), "-SNAPSHOT"));
return new ComparableVersion(removeEnd(System.getProperty("testng.version", "7.10.1"), "-SNAPSHOT"));
}
}

0 comments on commit 21f80fb

Please sign in to comment.