dotty phase 2: scalafix ExplicitNonNullaryApply (#28949)
* scalafix ExplicitNonNullaryApply prepare + Temporarily use com.sandinh:sbt-scalafix because scalacenter/scalafix#1098 + Add ExplicitNonNullaryApply rule to .scalafix.conf + Manually fix a NonNullaryApply case in DeathWatchSpec that cause `fixall` fail because ExplicitNonNullaryApply rule incorrectly rewrite `context unbecome` to `context unbecome()` instead of `context.unbecome()` * scalafix ExplicitNonNullaryApply fix by enabling only ExplicitNonNullaryApply rule in .scalafix.conf then: ``` % sbt -Dakka.build.scalaVersion=2.13.1 > fixall ``` * scalafmtAll * Revert to ch.epfl.scala:sbt-scalafix Co-authored-by: Bùi Việt Thành <thanhbv@sandinh.net>
This commit is contained in:
parent
4ba835d328
commit
ea7205eaf7
266 changed files with 929 additions and 919 deletions
|
|
@ -29,19 +29,19 @@ class PatternSpec extends AkkaSpec {
|
|||
"pattern.gracefulStop" must {
|
||||
|
||||
"provide Future for stopping an actor" in {
|
||||
val target = system.actorOf(Props[TargetActor])
|
||||
val target = system.actorOf(Props[TargetActor]())
|
||||
val result = gracefulStop(target, 5 seconds)
|
||||
Await.result(result, 6 seconds) should ===(true)
|
||||
}
|
||||
|
||||
"complete Future when actor already terminated" in {
|
||||
val target = system.actorOf(Props[TargetActor])
|
||||
val target = system.actorOf(Props[TargetActor]())
|
||||
Await.ready(gracefulStop(target, 5 seconds), 6 seconds)
|
||||
Await.ready(gracefulStop(target, 1 millis), 1 second)
|
||||
}
|
||||
|
||||
"complete Future with AskTimeoutException when actor not terminated within timeout" in {
|
||||
val target = system.actorOf(Props[TargetActor])
|
||||
val target = system.actorOf(Props[TargetActor]())
|
||||
val latch = TestLatch()
|
||||
target ! ((latch, remainingOrDefault))
|
||||
intercept[AskTimeoutException] { Await.result(gracefulStop(target, 500 millis), remainingOrDefault) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue