You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "He-Pin (via GitHub)" <gi...@apache.org> on 2026/06/26 14:27:21 UTC
[PR] refactor: remove JUnit 4 support and upgrade to JUnit 6.1.0 [pekko-http]
He-Pin opened a new pull request, #1096:
URL: https://github.com/apache/pekko-http/pull/1096
## Summary
- Remove deprecated JUnit 4 testkit classes (`JUnitRouteTest`, `JUnitRouteTestBase`, `ActorSystemResource`)
- Remove `junit:junit:4.13.2` and `scalatestplus:junit-4-13` dependencies
- Upgrade JUnit Jupiter and Platform to 6.1.0
- Update documentation references to use `JUnitJupiterRouteTest`
## Modification
- Deleted `JUnitRouteTest.scala` (deprecated since 2.0.0, users should use `JUnitJupiterRouteTest`)
- Removed `junit4Version`, `Test.junit4`, and `Test.scalatestplusJUnit` from `Dependencies.scala`
- Removed `scalatestplusJUnit` from `httpCore`, `httpJackson`, `httpJackson3`, and `httpTestkit` modules
- Added `JupiterKeys.junitJupiterVersion := "6.1.0"` and `JupiterKeys.junitPlatformVersion := "6.1.0"` as `ThisBuild` overrides
- Updated Scaladoc and Paradox documentation to reference `JUnitJupiterRouteTest`
## Test plan
- [ ] CI passes with JUnit 6.1.0
- [ ] All existing Jupiter tests continue to run correctly
- [ ] MiMa check passes (may need exclusion for removed deprecated classes)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] refactor: remove JUnit 4 support and upgrade to JUnit 6.1.0 [pekko-http]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #1096:
URL: https://github.com/apache/pekko-http/pull/1096#issuecomment-4810558404
```
[error] /home/runner/work/pekko-http/pekko-http/docs/src/test/java/docs/http/javadsl/RespondWithHeaderHandlerExampleTest.java:18:30: package junit.framework does not exist
[error] junit.framework.TestCase
[error] ^
[error] /home/runner/work/pekko-http/pekko-http/docs/src/test/java/docs/http/javadsl/RespondWithHeaderHandlerExampleTest.java:18:1: static import only from classes and interfaces
[error] import static junit.framework.TestCase.assertTrue;
[error] /home/runner/work/pekko-http/pekko-http/docs/src/test/java/docs/http/javadsl/RespondWithHeaderHandlerExampleTest.java:58:5: cannot find symbol
[error] symbol: method assertTrue(boolean)
[error] location: class docs.http.javadsl.RespondWithHeaderHandlerExampleTest
[error] assertTrue
[error] ^
[error] /home/runner/work/pekko-http/pekko-http/docs/src/test/java/docs/http/javadsl/RespondWithHeaderHandlerExampleTest.java:59:5: cannot find symbol
[error] symbol: method assertTrue(boolean)
[error] location: class docs.http.javadsl.RespondWithHeaderHandlerExampleTest
[error] assertTrue
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] refactor: remove JUnit 4 support and upgrade to JUnit 6.1.0 [pekko-http]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #1096:
URL: https://github.com/apache/pekko-http/pull/1096#discussion_r3482054085
##########
http-testkit/src/main/scala/org/apache/pekko/http/javadsl/testkit/JUnitRouteTest.scala:
##########
@@ -1,96 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * license agreements; and to You under the Apache License, version 2.0:
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * This file is part of the Apache Pekko project, which was derived from Akka.
- */
-
-/*
- * Copyright (C) 2009-2022 Lightbend Inc. <https://www.lightbend.com>
- */
-
-package org.apache.pekko.http.javadsl.testkit
-
-import scala.concurrent.{ Await, Future }
-import scala.concurrent.duration._
-
-import org.junit.{ Assert, Rule }
-import org.junit.rules.ExternalResource
-
-import org.apache.pekko
-import pekko.actor.ActorSystem
-import pekko.event.Logging
-import pekko.http.javadsl.model.HttpRequest
-import pekko.http.javadsl.server._
-import pekko.stream.Materializer
-import pekko.stream.SystemMaterializer
-
-import com.typesafe.config.{ Config, ConfigFactory }
-
-/**
- * A RouteTest that uses JUnit assertions. ActorSystem and Materializer are provided as an [[org.junit.rules.ExternalResource]]
- * and their lifetime is automatically managed.
- */
-@deprecated("Use JUnitJupiterRouteTestBase instead", "2.0.0")
Review Comment:
can't remove this class that was only deprecated recently
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] refactor: remove JUnit 4 support and upgrade to JUnit 6.1.0 [pekko-http]
Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on PR #1096:
URL: https://github.com/apache/pekko-http/pull/1096#issuecomment-4810597829
How about just deprecating it? @pjfanning And introduce a new one
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] refactor: remove JUnit 4 support and upgrade to JUnit 6.1.0 [pekko-http]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #1096:
URL: https://github.com/apache/pekko-http/pull/1096#issuecomment-4810619620
> How about just deprecating it? @pjfanning And introduce a new one
JUnitRouteTest is deprecated but deprecated long enough to be removed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] refactor: remove JUnit 4 support and upgrade to JUnit 6.1.0 [pekko-http]
Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin merged PR #1096:
URL: https://github.com/apache/pekko-http/pull/1096
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org