Hopefully correcting the FSMTransitionSpec and a ScalaDoc issue with mailbox.scala
This commit is contained in:
parent
8bca635279
commit
5a51f7750f
2 changed files with 4 additions and 9 deletions
|
|
@ -73,16 +73,11 @@ class FSMTransitionSpec extends AkkaSpec with ImplicitSender {
|
||||||
"not fail when listener goes away" in {
|
"not fail when listener goes away" in {
|
||||||
val forward = system.actorOf(Props(new Forwarder(testActor)))
|
val forward = system.actorOf(Props(new Forwarder(testActor)))
|
||||||
val fsm = system.actorOf(Props(new MyFSM(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)
|
fsm ! FSM.SubscribeTransitionCallBack(forward)
|
||||||
expectMsg(FSM.CurrentState(fsm, 0))
|
expectMsg(FSM.CurrentState(fsm, 0))
|
||||||
system.stop(forward)
|
akka.pattern.gracefulStop(forward, 5 seconds)
|
||||||
fsm ! "tick"
|
fsm ! "tick"
|
||||||
expectNoMsg
|
expectNoMsg
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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
|
* Reduce the suspend count by one. Caller does not need to worry about whether
|
||||||
* status was Scheduled or not.
|
* status was Scheduled or not.
|
||||||
*
|
*
|
||||||
* @returns true if the suspend count reached zero
|
* @return true if the suspend count reached zero
|
||||||
*/
|
*/
|
||||||
@tailrec
|
@tailrec
|
||||||
final def resume(): Boolean = status match {
|
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
|
* Increment the suspend count by one. Caller does not need to worry about whether
|
||||||
* status was Scheduled or not.
|
* status was Scheduled or not.
|
||||||
*
|
*
|
||||||
* @returns true if the previous suspend count was zero
|
* @return true if the previous suspend count was zero
|
||||||
*/
|
*/
|
||||||
@tailrec
|
@tailrec
|
||||||
final def suspend(): Boolean = status match {
|
final def suspend(): Boolean = status match {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue