This is an automated email from the ASF dual-hosted git repository.
He-Pin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-http.git
The following commit(s) were added to refs/heads/main by this push:
new 853b4305e refactor: upgrade JUnit Jupiter to 6.1.0 (#1096)
853b4305e is described below
commit 853b4305e1647de7885a1af055fac24d44b48f07
Author: He-Pin(kerr) <[email protected]>
AuthorDate: Fri Jun 26 23:59:36 2026 +0800
refactor: upgrade JUnit Jupiter to 6.1.0 (#1096)
Motivation:
JUnit 6 unifies version numbering across Platform, Jupiter, and Vintage.
Modification:
- Add JupiterKeys overrides for JUnit Jupiter and Platform 6.1.0
- Migrate remaining JUnit 4 test import to Jupiter Assertions
- Keep deprecated JUnitRouteTest for binary compatibility
Result:
All tests run on JUnit 6.1.0 while maintaining backward compatibility.
---
build.sbt | 4 ++++
.../java/docs/http/javadsl/RespondWithHeaderHandlerExampleTest.java | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/build.sbt b/build.sbt
index 260676678..7aa01b47b 100644
--- a/build.sbt
+++ b/build.sbt
@@ -18,6 +18,7 @@ import java.nio.file.attribute.{ PosixFileAttributeView,
PosixFilePermission }
import sbtdynver.GitDescribeOutput
import spray.boilerplate.BoilerplatePlugin
import com.lightbend.paradox.apidoc.ApidocPlugin.autoImport.apidocRootPackage
+import com.github.sbt.junit.jupiter.sbt.Import.JupiterKeys
sourceDistName := "apache-pekko-http"
sourceDistIncubating := false
@@ -27,6 +28,9 @@ ThisBuild / reproducibleBuildsCheckResolver :=
Resolver.ApacheMavenStagingRepo
ThisBuild / javafmtFormatterCompatibleJavaVersion := 17
ThisBuild / javafmtSortImports := false
+ThisBuild / JupiterKeys.junitJupiterVersion := "6.1.0"
+ThisBuild / JupiterKeys.junitPlatformVersion := "6.1.0"
+
addCommandAlias("checkCodeStyle", "scalafmtCheckAll; scalafmtSbtCheck;
javafmtCheckAll; +headerCheckAll")
addCommandAlias("applyCodeStyle", "+headerCreateAll; scalafmtAll; scalafmtSbt;
javafmtAll")
addCommandAlias(name = "sortImports", value = ";scalafixEnable; scalafixAll
SortImports; scalafmtAll")
diff --git
a/docs/src/test/java/docs/http/javadsl/RespondWithHeaderHandlerExampleTest.java
b/docs/src/test/java/docs/http/javadsl/RespondWithHeaderHandlerExampleTest.java
index 029fc37d5..6d43e13f1 100644
---
a/docs/src/test/java/docs/http/javadsl/RespondWithHeaderHandlerExampleTest.java
+++
b/docs/src/test/java/docs/http/javadsl/RespondWithHeaderHandlerExampleTest.java
@@ -15,7 +15,7 @@ package docs.http.javadsl;
// #respond-with-header-exceptionhandler-example
-import static junit.framework.TestCase.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import java.io.IOException;
import java.util.concurrent.CompletionStage;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]