Hopefully correcting the FSMTransitionSpec and a ScalaDoc issue with mailbox.scala

This commit is contained in:
Viktor Klang 2012-07-24 16:09:23 +02:00
parent 8bca635279
commit 5a51f7750f
2 changed files with 4 additions and 9 deletions

View file

@ -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
}

View file

@ -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 {