Update to a working version of Scalariform

This commit is contained in:
Björn Antonsson 2016-06-02 14:06:57 +02:00
parent cae070bd93
commit c66ce62d63
616 changed files with 5966 additions and 5436 deletions

View file

@ -24,7 +24,7 @@ class BackoffSupervisorDocSpec {
minBackoff = 3.seconds,
maxBackoff = 30.seconds,
randomFactor = 0.2 // adds 20% "noise" to vary the intervals slightly
))
))
system.actorOf(supervisor, name = "echoSupervisor")
//#backoff-stop
@ -44,7 +44,7 @@ class BackoffSupervisorDocSpec {
minBackoff = 3.seconds,
maxBackoff = 30.seconds,
randomFactor = 0.2 // adds 20% "noise" to vary the intervals slightly
))
))
system.actorOf(supervisor, name = "echoSupervisor")
//#backoff-fail
@ -59,14 +59,14 @@ class BackoffSupervisorDocSpec {
//#backoff-custom-stop
val supervisor = BackoffSupervisor.props(
Backoff.onStop(
childProps,
childName = "myEcho",
minBackoff = 3.seconds,
maxBackoff = 30.seconds,
randomFactor = 0.2 // adds 20% "noise" to vary the intervals slightly
).withManualReset // the child must send BackoffSupervisor.Reset to its parent
.withDefaultStoppingStrategy // Stop at any Exception thrown
)
childProps,
childName = "myEcho",
minBackoff = 3.seconds,
maxBackoff = 30.seconds,
randomFactor = 0.2 // adds 20% "noise" to vary the intervals slightly
).withManualReset // the child must send BackoffSupervisor.Reset to its parent
.withDefaultStoppingStrategy // Stop at any Exception thrown
)
//#backoff-custom-stop
system.actorOf(supervisor, name = "echoSupervisor")
@ -86,11 +86,11 @@ class BackoffSupervisorDocSpec {
minBackoff = 3.seconds,
maxBackoff = 30.seconds,
randomFactor = 0.2 // adds 20% "noise" to vary the intervals slightly
).withAutoReset(10.seconds) // the child must send BackoffSupervisor.Reset to its parent
).withAutoReset(10.seconds) // the child must send BackoffSupervisor.Reset to its parent
.withSupervisorStrategy(
OneForOneStrategy() {
case _: MyException SupervisorStrategy.Restart
case _ SupervisorStrategy.Escalate
case _: MyException => SupervisorStrategy.Restart
case _ => SupervisorStrategy.Escalate
}))
//#backoff-custom-fail

View file

@ -88,12 +88,14 @@ class SchedulerPatternSpec extends AkkaSpec {
}
"send periodic ticks from the constructor" taggedAs TimingTest in {
testSchedule(system.actorOf(Props(classOf[ScheduleInConstructor], testActor)),
testSchedule(
system.actorOf(Props(classOf[ScheduleInConstructor], testActor)),
3000 millis, 2000 millis)
}
"send ticks from the preStart and receive" taggedAs TimingTest in {
testSchedule(system.actorOf(Props(classOf[ScheduleInConstructor], testActor)),
testSchedule(
system.actorOf(Props(classOf[ScheduleInConstructor], testActor)),
3000 millis, 2500 millis)
}
}