mdedetrich commented on code in PR #2486:
URL: https://github.com/apache/pekko/pull/2486#discussion_r2522337259
##########
actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/ActorSystemStub.scala:
##########
@@ -113,6 +113,10 @@ import com.typesafe.config.{ Config, ConfigFactory }
override def terminate(): Unit = terminationPromise.trySuccess(Done)
override def whenTerminated: Future[Done] = terminationPromise.future
override def getWhenTerminated: CompletionStage[Done] = whenTerminated.asJava
+ override def close(): Unit = {
+ terminate()
+ Await.result(whenTerminated, scala.concurrent.duration.Duration.Inf)
Review Comment:
Actually in quite a few places we have `Await.result(whenTerminated,
scala.concurrent.duration.Duration.Inf)`, not just here where I introduced it.
I can do it, but this method isn't even executed/called so its quite benign and
from what I can tell the purpose of this `ActorSystemStub` is to not use any
config in order to make it easier to programmatically setup test scenarios.
I did look for any kind of timeout that can be used, but there isn't any in
this context.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]