From 21f80fb6efe32e7b1942623ccf1e60c6ea7bfe81 Mon Sep 17 00:00:00 2001 From: Marc Philipp Date: Tue, 9 Apr 2024 09:58:50 +0200 Subject: [PATCH] Update TestNG to 7.10.1 Issue: #116 --- README.adoc | 2 +- build.gradle.kts | 11 ++++++----- .../org/junit/support/testng/engine/TestContext.java | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/README.adoc b/README.adoc index 942b97f..fc586c0 100644 --- a/README.adoc +++ b/README.adoc @@ -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 diff --git a/build.gradle.kts b/build.gradle.kts index d36b785..4225d47 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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}") { @@ -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 { @@ -301,5 +300,7 @@ data class Version(val value: String) { value.replace(pattern, "_") } + fun isSnapshot() : Boolean = value.endsWith("-SNAPSHOT") + override fun toString() = value } diff --git a/src/test/java/org/junit/support/testng/engine/TestContext.java b/src/test/java/org/junit/support/testng/engine/TestContext.java index c33304b..e61d9f5 100644 --- a/src/test/java/org/junit/support/testng/engine/TestContext.java +++ b/src/test/java/org/junit/support/testng/engine/TestContext.java @@ -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")); } }