diff --git a/akka-actor-tests/src/test/scala/akka/actor/FSMTransitionSpec.scala b/akka-actor-tests/src/test/scala/akka/actor/FSMTransitionSpec.scala index 13fb4a1238..446f6fc9b3 100644 --- a/akka-actor-tests/src/test/scala/akka/actor/FSMTransitionSpec.scala +++ b/akka-actor-tests/src/test/scala/akka/actor/FSMTransitionSpec.scala @@ -73,16 +73,11 @@ class FSMTransitionSpec extends AkkaSpec with ImplicitSender { "not fail when listener goes away" in { val forward = system.actorOf(Props(new Forwarder(testActor))) val fsm = system.actorOf(Props(new MyFSM(testActor))) - val sup = system.actorOf(Props(new Actor { - context.watch(fsm) - override val supervisorStrategy = OneForOneStrategy(withinTimeRange = Duration.Inf)(List(classOf[Throwable])) - def receive = { case _ ⇒ } - })) - within(300 millis) { + within(1 second) { fsm ! FSM.SubscribeTransitionCallBack(forward) expectMsg(FSM.CurrentState(fsm, 0)) - system.stop(forward) + akka.pattern.gracefulStop(forward, 5 seconds) fsm ! "tick" expectNoMsg } diff --git a/akka-actor/src/main/scala/akka/dispatch/Mailbox.scala b/akka-actor/src/main/scala/akka/dispatch/Mailbox.scala index baf7b682c2..f7062d5138 100644 --- a/akka-actor/src/main/scala/akka/dispatch/Mailbox.scala +++ b/akka-actor/src/main/scala/akka/dispatch/Mailbox.scala @@ -128,7 +128,7 @@ private[akka] abstract class Mailbox(val messageQueue: MessageQueue) * Reduce the suspend count by one. Caller does not need to worry about whether * status was Scheduled or not. * - * @returns true if the suspend count reached zero + * @return true if the suspend count reached zero */ @tailrec final def resume(): Boolean = status match { @@ -143,7 +143,7 @@ private[akka] abstract class Mailbox(val messageQueue: MessageQueue) * Increment the suspend count by one. Caller does not need to worry about whether * status was Scheduled or not. * - * @returns true if the previous suspend count was zero + * @return true if the previous suspend count was zero */ @tailrec final def suspend(): Boolean = status match {