introduce akka.actor.creation-timeout to make Jenkins happy
- I had reused akka.actor.timeout for ActorSystem.actorOf calls (which “ask” the guardian to create the actor), but 5sec proved too short for Jenkins - CreationTimeout defaults to 30sec now, let’s hope Jenkins is not slower than _that_.
This commit is contained in:
parent
66c1d62a51
commit
d6fc97c48d
4 changed files with 20 additions and 16 deletions
|
|
@ -36,6 +36,7 @@ akka {
|
|||
|
||||
actor {
|
||||
provider = "akka.actor.LocalActorRefProvider"
|
||||
creation-timeout = 20s # Timeout for ActorSystem.actorOf
|
||||
timeout = 5s # Default timeout for Future based invocations
|
||||
# - Actor: ask && ?
|
||||
# - UntypedActor: ask
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ object ActorSystem {
|
|||
|
||||
val ProviderClass = getString("akka.actor.provider")
|
||||
|
||||
val CreationTimeout = Timeout(Duration(getMilliseconds("akka.actor.creation-timeout"), MILLISECONDS))
|
||||
val ActorTimeout = Timeout(Duration(getMilliseconds("akka.actor.timeout"), MILLISECONDS))
|
||||
val SerializeAllMessages = getBoolean("akka.actor.serialize-messages")
|
||||
|
||||
|
|
@ -300,19 +301,21 @@ class ActorSystemImpl(val name: String, applicationConfig: Config) extends Actor
|
|||
|
||||
protected def systemImpl = this
|
||||
|
||||
implicit def timeout = settings.ActorTimeout
|
||||
|
||||
private[akka] def systemActorOf(props: Props, name: String): ActorRef =
|
||||
private[akka] def systemActorOf(props: Props, name: String): ActorRef = {
|
||||
implicit val timeout = settings.CreationTimeout
|
||||
(systemGuardian ? CreateChild(props, name)).get match {
|
||||
case ref: ActorRef ⇒ ref
|
||||
case ex: Exception ⇒ throw ex
|
||||
}
|
||||
}
|
||||
|
||||
def actorOf(props: Props, name: String): ActorRef =
|
||||
def actorOf(props: Props, name: String): ActorRef = {
|
||||
implicit val timeout = settings.CreationTimeout
|
||||
(guardian ? CreateChild(props, name)).get match {
|
||||
case ref: ActorRef ⇒ ref
|
||||
case ex: Exception ⇒ throw ex
|
||||
}
|
||||
}
|
||||
|
||||
import settings._
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ package akka.actor
|
|||
|
||||
import akka.util.Duration
|
||||
|
||||
/**
|
||||
/**
|
||||
* An Akka scheduler service. This one needs one special behavior: if
|
||||
* Closeable, it MUST execute all outstanding tasks upon .close() in order
|
||||
* to properly shutdown all dispatchers.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue