Provide more helpful message when synchronous testing ActorRef is used for asking (#27414)
This commit is contained in:
parent
4f6cccc4d8
commit
051ff07ca2
1 changed files with 5 additions and 1 deletions
|
|
@ -45,7 +45,11 @@ private[akka] final class FunctionRef[-T](override val path: ActorPath, send: (T
|
||||||
override def isLocal = true
|
override def isLocal = true
|
||||||
|
|
||||||
// impl InternalRecipientRef, ask not supported
|
// impl InternalRecipientRef, ask not supported
|
||||||
override def provider: ActorRefProvider = throw new UnsupportedOperationException("no provider")
|
override def provider: ActorRefProvider =
|
||||||
|
throw new UnsupportedOperationException(
|
||||||
|
"ActorRefs created for synchronous testing cannot be used as targets for asking. Use asynchronous testing instead. " +
|
||||||
|
"See https://doc.akka.io/docs/akka/current/typed/testing.html#asynchronous-testing")
|
||||||
|
|
||||||
// impl InternalRecipientRef
|
// impl InternalRecipientRef
|
||||||
def isTerminated: Boolean = false
|
def isTerminated: Boolean = false
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue