Class TestProbeImpl<M>

  • All Implemented Interfaces:
    TestProbe<M>

    public final class TestProbeImpl<M>
    extends TestProbe<M>
    implements TestProbe<M>
    if last assertion was expectNoMessage, disable timing failure upon within() block end.
    • Constructor Summary

      Constructors 
      Constructor Description
      TestProbeImpl​(java.lang.String name, ActorSystem<?> system)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <A> A awaitAssert​(java.time.Duration max, java.time.Duration interval, java.util.function.Supplier<A> supplier)
      Evaluate the given assert every interval until it does not throw an exception and return the result.
      <A> A awaitAssert​(java.time.Duration max, java.util.function.Supplier<A> supplier)
      Evaluate the given assert every 100 milliseconds until it does not throw an exception and return the result.
      <A> A awaitAssert​(java.util.function.Supplier<A> supplier)
      Evaluate the given assert every 100 milliseconds until it does not throw an exception and return the result.
      <A> A awaitAssert​(scala.Function0<A> a)
      Evaluate the given assert every 100 ms until it does not throw an exception and return the result.
      <A> A awaitAssert​(scala.Function0<A> a, scala.concurrent.duration.FiniteDuration max)
      Evaluate the given assert every 100 ms until it does not throw an exception and return the result.
      <A> A awaitAssert​(scala.Function0<A> a, scala.concurrent.duration.FiniteDuration max, scala.concurrent.duration.FiniteDuration interval)
      Evaluate the given assert every interval until it does not throw an exception and return the result.
      <T extends M>
      T
      expectMessage​(java.time.Duration max, java.lang.String hint, T obj)
      Receive one message from the test actor and assert that it equals the given object.
      <T extends M>
      T
      expectMessage​(java.time.Duration max, T obj)
      Receive one message from the test actor and assert that it equals the given object.
      <T extends M>
      T
      expectMessage​(scala.concurrent.duration.FiniteDuration max, java.lang.String hint, T obj)
      Receive one message from the test actor and assert that it equals the given object.
      <T extends M>
      T
      expectMessage​(scala.concurrent.duration.FiniteDuration max, T obj)
      Receive one message from the test actor and assert that it equals the given object.
      <T extends M>
      T
      expectMessage​(T obj)
      Same as expectMessage(remainingOrDefault, obj), but using the default timeout as deadline.
      <T extends M>
      T
      expectMessageClass​(java.lang.Class<T> clazz)
      Same as expectMessageType(clazz, remainingOrDefault),but using the default timeout as deadline.
      <T extends M>
      T
      expectMessageClass​(java.lang.Class<T> clazz, java.time.Duration max)
      Wait for a message of type M and return it when it arrives, or fail if the max timeout is hit.
      <T extends M>
      T
      expectMessageType​(scala.concurrent.duration.FiniteDuration max, scala.reflect.ClassTag<T> t)
      Expect a message of type T to arrive within max or fail.
      <T extends M>
      T
      expectMessageType​(scala.reflect.ClassTag<T> t)
      Same as expectMessageType[T](remainingOrDefault), but using the default timeout as deadline.
      void expectNoMessage()
      Assert that no message is received.
      void expectNoMessage​(java.time.Duration max)
      Assert that no message is received for the specified time.
      void expectNoMessage​(scala.concurrent.duration.FiniteDuration max)
      Assert that no message is received for the specified time.
      <U> void expectTerminated​(ActorRef<U> actorRef)
      Expect the given actor to be stopped or stop within the default timeout.
      <U> void expectTerminated​(ActorRef<U> actorRef, java.time.Duration max)
      Expect the given actor to be stopped or stop within the given timeout or throw an AssertionError.
      <U> void expectTerminated​(ActorRef<U> actorRef, scala.concurrent.duration.FiniteDuration max)
      Expect the given actor to be stopped or stop within the given timeout or throw an AssertionError.
      java.util.List<M> fishForMessage​(java.time.Duration max, java.lang.String hint, java.util.function.Function<M,​FishingOutcome> fisher)
      Same as the other fishForMessage but includes the provided hint in all error messages
      java.util.List<M> fishForMessage​(java.time.Duration max, java.util.function.Function<M,​FishingOutcome> fisher)
      Java API: Allows for flexible matching of multiple messages within a timeout, the fisher function is fed each incoming message, and returns one of the following effects to decide on what happens next:
      scala.collection.immutable.Seq<M> fishForMessage​(scala.concurrent.duration.FiniteDuration max, java.lang.String hint, scala.Function1<M,​FishingOutcome> fisher)
      Allows for flexible matching of multiple messages within a timeout, the fisher function is fed each incoming message, and returns one of the following effects to decide on what happens next:
      scala.collection.immutable.Seq<M> fishForMessage​(scala.concurrent.duration.FiniteDuration max, scala.Function1<M,​FishingOutcome> fisher)
      Same as the other fishForMessage but with no hint
      java.time.Duration getRemaining()
      Obtain time remaining for execution of the innermost enclosing within block or throw an AssertionError if no within block surrounds this call.
      java.time.Duration getRemainingOr​(java.time.Duration duration)
      Obtain time remaining for execution of the innermost enclosing within block or missing that it returns the given duration.
      java.time.Duration getRemainingOrDefault()
      Obtain time remaining for execution of the innermost enclosing within block or missing that it returns the properly dilated default for this case from settings (key "akka.actor.testkit.typed.single-expect-default").
      M receiveMessage()
      Receive one message of type M within the default timeout as deadline.
      M receiveMessage​(java.time.Duration max)
      Receive one message of type M.
      M receiveMessage​(scala.concurrent.duration.FiniteDuration max)
      Receive one message of type M.
      M receiveMessage_internal​(scala.concurrent.duration.FiniteDuration max)  
      scala.collection.immutable.Seq<M> receiveMessages​(int n)
      Same as receiveMessages(n, remaining) but using the default timeout as deadline.
      scala.collection.immutable.Seq<M> receiveMessages​(int n, scala.concurrent.duration.FiniteDuration max)
      Receive n messages in a row before the given deadline.
      java.util.List<M> receiveSeveralMessages​(int n)
      Same as receiveSeveralMessages(n, remaining) but using the default timeout as deadline.
      java.util.List<M> receiveSeveralMessages​(int n, java.time.Duration max)
      Receive n messages in a row before the given deadline.
      ActorRef<M> ref()
      ActorRef for this TestProbe
      scala.concurrent.duration.FiniteDuration remaining()
      Obtain time remaining for execution of the innermost enclosing within block or throw an AssertionError if no within block surrounds this call.
      scala.concurrent.duration.FiniteDuration remainingOr​(scala.concurrent.duration.FiniteDuration duration)
      Obtain time remaining for execution of the innermost enclosing within block or missing that it returns the given duration.
      scala.concurrent.duration.FiniteDuration remainingOrDefault()
      Obtain time remaining for execution of the innermost enclosing within block or missing that it returns the properly dilated default for this case from settings (key "akka.actor.testkit.typed.single-expect-default").
      protected TestKitSettings settings()  
      void stop()
      Stops the TestProbe.getRef, which is useful when testing watch and termination.
      <T> T within​(java.time.Duration min, java.time.Duration max, java.util.function.Supplier<T> f)
      Execute code block while bounding its execution time between min and max.
      <T> T within​(java.time.Duration max, java.util.function.Supplier<T> f)
      Same as calling within(0 seconds, max)(f).
      <T> T within​(scala.concurrent.duration.FiniteDuration min, scala.concurrent.duration.FiniteDuration max, scala.Function0<T> f)
      Execute code block while bounding its execution time between min and max.
      <T> T within​(scala.concurrent.duration.FiniteDuration max, scala.Function0<T> f)
      Same as calling within(0 seconds, max)(f).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TestProbeImpl

        public TestProbeImpl​(java.lang.String name,
                             ActorSystem<?> system)
    • Method Detail

      • remainingOrDefault

        public scala.concurrent.duration.FiniteDuration remainingOrDefault()
        Description copied from interface: TestProbe
        Obtain time remaining for execution of the innermost enclosing within block or missing that it returns the properly dilated default for this case from settings (key "akka.actor.testkit.typed.single-expect-default").
        Specified by:
        remainingOrDefault in interface TestProbe<M>
        Returns:
        (undocumented)
      • getRemainingOrDefault

        public java.time.Duration getRemainingOrDefault()
        Description copied from class: TestProbe
        Obtain time remaining for execution of the innermost enclosing within block or missing that it returns the properly dilated default for this case from settings (key "akka.actor.testkit.typed.single-expect-default").
        Specified by:
        getRemainingOrDefault in class TestProbe<M>
        Returns:
        (undocumented)
      • remaining

        public scala.concurrent.duration.FiniteDuration remaining()
        Description copied from interface: TestProbe
        Obtain time remaining for execution of the innermost enclosing within block or throw an AssertionError if no within block surrounds this call.
        Specified by:
        remaining in interface TestProbe<M>
        Returns:
        (undocumented)
      • getRemaining

        public java.time.Duration getRemaining()
        Description copied from class: TestProbe
        Obtain time remaining for execution of the innermost enclosing within block or throw an AssertionError if no within block surrounds this call.
        Specified by:
        getRemaining in class TestProbe<M>
        Returns:
        (undocumented)
      • remainingOr

        public scala.concurrent.duration.FiniteDuration remainingOr​(scala.concurrent.duration.FiniteDuration duration)
        Description copied from interface: TestProbe
        Obtain time remaining for execution of the innermost enclosing within block or missing that it returns the given duration.
        Specified by:
        remainingOr in interface TestProbe<M>
        Parameters:
        duration - (undocumented)
        Returns:
        (undocumented)
      • getRemainingOr

        public java.time.Duration getRemainingOr​(java.time.Duration duration)
        Description copied from class: TestProbe
        Obtain time remaining for execution of the innermost enclosing within block or missing that it returns the given duration.
        Specified by:
        getRemainingOr in class TestProbe<M>
        Parameters:
        duration - (undocumented)
        Returns:
        (undocumented)
      • within

        public <T> T within​(scala.concurrent.duration.FiniteDuration min,
                            scala.concurrent.duration.FiniteDuration max,
                            scala.Function0<T> f)
        Description copied from interface: TestProbe
        Execute code block while bounding its execution time between min and max. within blocks may be nested. All methods in this trait which take maximum wait times are available in a version which implicitly uses the remaining time governed by the innermost enclosing within block.

        Note that the max timeout is scaled using the configuration entry "akka.actor.testkit.typed.timefactor", while the min Duration is not.

        
         val ret = within(50 millis) {
           test ! Ping
           expectMessageType[Pong]
         }
         
        Specified by:
        within in interface TestProbe<M>
        Parameters:
        min - (undocumented)
        max - (undocumented)
        f - (undocumented)
        Returns:
        (undocumented)
      • within

        public <T> T within​(scala.concurrent.duration.FiniteDuration max,
                            scala.Function0<T> f)
        Description copied from interface: TestProbe
        Same as calling within(0 seconds, max)(f).
        Specified by:
        within in interface TestProbe<M>
        Parameters:
        max - (undocumented)
        f - (undocumented)
        Returns:
        (undocumented)
      • within

        public <T> T within​(java.time.Duration min,
                            java.time.Duration max,
                            java.util.function.Supplier<T> f)
        Description copied from class: TestProbe
        Execute code block while bounding its execution time between min and max. within blocks may be nested. All methods in this trait which take maximum wait times are available in a version which implicitly uses the remaining time governed by the innermost enclosing within block.

        Note that the max timeout is scaled using the configuration entry "akka.actor.testkit.typed.timefactor", while the min Duration is not.

        
         val ret = within(50 millis) {
           test ! Ping
           expectMessageType[Pong]
         }
         
        Specified by:
        within in class TestProbe<M>
        Parameters:
        min - (undocumented)
        max - (undocumented)
        f - (undocumented)
        Returns:
        (undocumented)
      • within

        public <T> T within​(java.time.Duration max,
                            java.util.function.Supplier<T> f)
        Description copied from class: TestProbe
        Same as calling within(0 seconds, max)(f).
        Specified by:
        within in class TestProbe<M>
        Parameters:
        max - (undocumented)
        f - (undocumented)
        Returns:
        (undocumented)
      • expectMessage

        public <T extends M> T expectMessage​(T obj)
        Description copied from class: TestProbe
        Same as expectMessage(remainingOrDefault, obj), but using the default timeout as deadline.
        Specified by:
        expectMessage in interface TestProbe<M>
        Specified by:
        expectMessage in class TestProbe<M>
        Parameters:
        obj - (undocumented)
        Returns:
        (undocumented)
      • expectMessage

        public <T extends M> T expectMessage​(scala.concurrent.duration.FiniteDuration max,
                                             T obj)
        Description copied from interface: TestProbe
        Receive one message from the test actor and assert that it equals the given object. Wait time is bounded by the given duration, with an AssertionError being thrown in case of timeout.

        Specified by:
        expectMessage in interface TestProbe<M>
        Parameters:
        max - (undocumented)
        obj - (undocumented)
        Returns:
        the received object
      • expectMessage

        public <T extends M> T expectMessage​(java.time.Duration max,
                                             T obj)
        Description copied from class: TestProbe
        Receive one message from the test actor and assert that it equals the given object. Wait time is bounded by the given duration, with an AssertionError being thrown in case of timeout.

        Specified by:
        expectMessage in class TestProbe<M>
        Parameters:
        max - (undocumented)
        obj - (undocumented)
        Returns:
        the received object
      • expectMessage

        public <T extends M> T expectMessage​(scala.concurrent.duration.FiniteDuration max,
                                             java.lang.String hint,
                                             T obj)
        Description copied from interface: TestProbe
        Receive one message from the test actor and assert that it equals the given object. Wait time is bounded by the given duration, with an AssertionError being thrown in case of timeout.

        Specified by:
        expectMessage in interface TestProbe<M>
        Parameters:
        max - (undocumented)
        hint - (undocumented)
        obj - (undocumented)
        Returns:
        the received object
      • expectMessage

        public <T extends M> T expectMessage​(java.time.Duration max,
                                             java.lang.String hint,
                                             T obj)
        Description copied from class: TestProbe
        Receive one message from the test actor and assert that it equals the given object. Wait time is bounded by the given duration, with an AssertionError being thrown in case of timeout.

        Specified by:
        expectMessage in class TestProbe<M>
        Parameters:
        max - (undocumented)
        hint - (undocumented)
        obj - (undocumented)
        Returns:
        the received object
      • receiveMessage

        public M receiveMessage()
        Description copied from class: TestProbe
        Receive one message of type M within the default timeout as deadline.
        Specified by:
        receiveMessage in interface TestProbe<M>
        Specified by:
        receiveMessage in class TestProbe<M>
        Returns:
        (undocumented)
      • receiveMessage

        public M receiveMessage​(java.time.Duration max)
        Description copied from class: TestProbe
        Receive one message of type M. Wait time is bounded by the max duration, with an AssertionError raised in case of timeout.
        Specified by:
        receiveMessage in class TestProbe<M>
        Parameters:
        max - (undocumented)
        Returns:
        (undocumented)
      • receiveMessage

        public M receiveMessage​(scala.concurrent.duration.FiniteDuration max)
        Description copied from interface: TestProbe
        Receive one message of type M. Wait time is bounded by the max duration, with an AssertionError raised in case of timeout.
        Specified by:
        receiveMessage in interface TestProbe<M>
        Parameters:
        max - (undocumented)
        Returns:
        (undocumented)
      • receiveMessage_internal

        public M receiveMessage_internal​(scala.concurrent.duration.FiniteDuration max)
      • expectNoMessage

        public void expectNoMessage​(scala.concurrent.duration.FiniteDuration max)
        Description copied from interface: TestProbe
        Assert that no message is received for the specified time. Supplied value is not dilated.
        Specified by:
        expectNoMessage in interface TestProbe<M>
        Parameters:
        max - (undocumented)
      • expectNoMessage

        public void expectNoMessage​(java.time.Duration max)
        Description copied from class: TestProbe
        Assert that no message is received for the specified time. Supplied value is not dilated.
        Specified by:
        expectNoMessage in class TestProbe<M>
        Parameters:
        max - (undocumented)
      • expectNoMessage

        public void expectNoMessage()
        Description copied from class: TestProbe
        Assert that no message is received. Waits for the default period configured as akka.actor.testkit.typed.expect-no-message-default. That timeout is scaled using the configuration entry "akka.actor.testkit.typed.timefactor".
        Specified by:
        expectNoMessage in interface TestProbe<M>
        Specified by:
        expectNoMessage in class TestProbe<M>
      • expectMessageType

        public <T extends M> T expectMessageType​(scala.reflect.ClassTag<T> t)
        Description copied from interface: TestProbe
        Same as expectMessageType[T](remainingOrDefault), but using the default timeout as deadline.
        Specified by:
        expectMessageType in interface TestProbe<M>
        Parameters:
        t - (undocumented)
        Returns:
        (undocumented)
      • expectMessageType

        public <T extends M> T expectMessageType​(scala.concurrent.duration.FiniteDuration max,
                                                 scala.reflect.ClassTag<T> t)
        Description copied from interface: TestProbe
        Expect a message of type T to arrive within max or fail. max is dilated.
        Specified by:
        expectMessageType in interface TestProbe<M>
        Parameters:
        max - (undocumented)
        t - (undocumented)
        Returns:
        (undocumented)
      • expectMessageClass

        public <T extends M> T expectMessageClass​(java.lang.Class<T> clazz)
        Description copied from class: TestProbe
        Same as expectMessageType(clazz, remainingOrDefault),but using the default timeout as deadline.
        Specified by:
        expectMessageClass in class TestProbe<M>
        Parameters:
        clazz - (undocumented)
        Returns:
        (undocumented)
      • expectMessageClass

        public <T extends M> T expectMessageClass​(java.lang.Class<T> clazz,
                                                  java.time.Duration max)
        Description copied from class: TestProbe
        Wait for a message of type M and return it when it arrives, or fail if the max timeout is hit.

        Note that the timeout is scaled using the configuration entry "akka.actor.testkit.typed.timefactor".

        Specified by:
        expectMessageClass in class TestProbe<M>
        Parameters:
        clazz - (undocumented)
        max - (undocumented)
        Returns:
        (undocumented)
      • receiveMessages

        public scala.collection.immutable.Seq<M> receiveMessages​(int n)
        Description copied from interface: TestProbe
        Same as receiveMessages(n, remaining) but using the default timeout as deadline.
        Specified by:
        receiveMessages in interface TestProbe<M>
        Parameters:
        n - (undocumented)
        Returns:
        (undocumented)
      • receiveMessages

        public scala.collection.immutable.Seq<M> receiveMessages​(int n,
                                                                 scala.concurrent.duration.FiniteDuration max)
        Description copied from interface: TestProbe
        Receive n messages in a row before the given deadline.

        Note that the timeout is scaled using the configuration entry "akka.actor.testkit.typed.timefactor".

        Specified by:
        receiveMessages in interface TestProbe<M>
        Parameters:
        n - (undocumented)
        max - (undocumented)
        Returns:
        (undocumented)
      • receiveSeveralMessages

        public java.util.List<M> receiveSeveralMessages​(int n)
        Description copied from class: TestProbe
        Same as receiveSeveralMessages(n, remaining) but using the default timeout as deadline.
        Specified by:
        receiveSeveralMessages in class TestProbe<M>
        Parameters:
        n - (undocumented)
        Returns:
        (undocumented)
      • receiveSeveralMessages

        public java.util.List<M> receiveSeveralMessages​(int n,
                                                        java.time.Duration max)
        Description copied from class: TestProbe
        Receive n messages in a row before the given deadline.

        Note that the timeout is scaled using the configuration entry "akka.actor.testkit.typed.timefactor".

        Specified by:
        receiveSeveralMessages in class TestProbe<M>
        Parameters:
        n - (undocumented)
        max - (undocumented)
        Returns:
        (undocumented)
      • fishForMessage

        public scala.collection.immutable.Seq<M> fishForMessage​(scala.concurrent.duration.FiniteDuration max,
                                                                java.lang.String hint,
                                                                scala.Function1<M,​FishingOutcome> fisher)
        Description copied from interface: TestProbe
        Allows for flexible matching of multiple messages within a timeout, the fisher function is fed each incoming message, and returns one of the following effects to decide on what happens next:

        * {@link FishingOutcomes.continue} - continue with the next message given that the timeout has not been reached * FishingOutcomes.continueAndIgnore - continue and do not save the message in the returned list * FishingOutcomes.complete - successfully complete and return the message * FishingOutcomes.fail - fail the test with a custom message

        Additionally failures includes the list of messages consumed. If the fisher function throws a match error the error is decorated with some fishing details and the test is failed (making it convenient to use this method with a partial function).

        Specified by:
        fishForMessage in interface TestProbe<M>
        Parameters:
        max - Max total time without the fisher function returning CompleteFishing before failing. The timeout is scaled using the configuration entry "akka.actor.testkit.typed.timefactor".
        hint - (undocumented)
        fisher - (undocumented)
        Returns:
        The messages accepted in the order they arrived
      • fishForMessage

        public scala.collection.immutable.Seq<M> fishForMessage​(scala.concurrent.duration.FiniteDuration max,
                                                                scala.Function1<M,​FishingOutcome> fisher)
        Description copied from interface: TestProbe
        Same as the other fishForMessage but with no hint
        Specified by:
        fishForMessage in interface TestProbe<M>
        Parameters:
        max - (undocumented)
        fisher - (undocumented)
        Returns:
        (undocumented)
      • fishForMessage

        public java.util.List<M> fishForMessage​(java.time.Duration max,
                                                java.util.function.Function<M,​FishingOutcome> fisher)
        Description copied from class: TestProbe
        Java API: Allows for flexible matching of multiple messages within a timeout, the fisher function is fed each incoming message, and returns one of the following effects to decide on what happens next:

        * {@link FishingOutcomes.continue()} - continue with the next message given that the timeout has not been reached * {@link FishingOutcomes.complete()} - successfully complete and return the message * {@link FishingOutcomes.fail(errorMsg)} - fail the test with a custom message

        Additionally failures includes the list of messages consumed. If a message of type M but not of type T is received this will also fail the test, additionally if the fisher function throws a match error the error is decorated with some fishing details and the test is failed (making it convenient to use this method with a partial function).

        Specified by:
        fishForMessage in class TestProbe<M>
        Parameters:
        max - Max total time without the fisher function returning CompleteFishing before failing. The timeout is scaled using the configuration entry "akka.actor.testkit.typed.timefactor".
        fisher - (undocumented)
        Returns:
        The messages accepted in the order they arrived
      • fishForMessage

        public java.util.List<M> fishForMessage​(java.time.Duration max,
                                                java.lang.String hint,
                                                java.util.function.Function<M,​FishingOutcome> fisher)
        Description copied from class: TestProbe
        Same as the other fishForMessage but includes the provided hint in all error messages
        Specified by:
        fishForMessage in class TestProbe<M>
        Parameters:
        max - (undocumented)
        hint - (undocumented)
        fisher - (undocumented)
        Returns:
        (undocumented)
      • expectTerminated

        public <U> void expectTerminated​(ActorRef<U> actorRef,
                                         scala.concurrent.duration.FiniteDuration max)
        Description copied from interface: TestProbe
        Expect the given actor to be stopped or stop within the given timeout or throw an AssertionError.
        Specified by:
        expectTerminated in interface TestProbe<M>
        Parameters:
        actorRef - (undocumented)
        max - (undocumented)
      • expectTerminated

        public <U> void expectTerminated​(ActorRef<U> actorRef)
        Description copied from class: TestProbe
        Expect the given actor to be stopped or stop within the default timeout.
        Specified by:
        expectTerminated in interface TestProbe<M>
        Specified by:
        expectTerminated in class TestProbe<M>
        Parameters:
        actorRef - (undocumented)
      • expectTerminated

        public <U> void expectTerminated​(ActorRef<U> actorRef,
                                         java.time.Duration max)
        Description copied from class: TestProbe
        Expect the given actor to be stopped or stop within the given timeout or throw an AssertionError.

        Note that the timeout is scaled using the configuration entry "akka.actor.testkit.typed.timefactor".

        Specified by:
        expectTerminated in class TestProbe<M>
        Parameters:
        actorRef - (undocumented)
        max - (undocumented)
      • awaitAssert

        public <A> A awaitAssert​(scala.Function0<A> a,
                                 scala.concurrent.duration.FiniteDuration max,
                                 scala.concurrent.duration.FiniteDuration interval)
        Description copied from interface: TestProbe
        Evaluate the given assert every interval until it does not throw an exception and return the result.

        If the max timeout expires the last exception is thrown.

        Note that the timeout is scaled using the configuration entry "akka.actor.testkit.typed.timefactor".

        Specified by:
        awaitAssert in interface TestProbe<M>
        Parameters:
        a - (undocumented)
        max - (undocumented)
        interval - (undocumented)
        Returns:
        (undocumented)
      • awaitAssert

        public <A> A awaitAssert​(scala.Function0<A> a,
                                 scala.concurrent.duration.FiniteDuration max)
        Description copied from interface: TestProbe
        Evaluate the given assert every 100 ms until it does not throw an exception and return the result.

        If the max timeout expires the last exception is thrown.

        Specified by:
        awaitAssert in interface TestProbe<M>
        Parameters:
        a - (undocumented)
        max - (undocumented)
        Returns:
        (undocumented)
      • awaitAssert

        public <A> A awaitAssert​(scala.Function0<A> a)
        Description copied from interface: TestProbe
        Evaluate the given assert every 100 ms until it does not throw an exception and return the result.

        If the default timeout expires the last exception is thrown.

        Specified by:
        awaitAssert in interface TestProbe<M>
        Parameters:
        a - (undocumented)
        Returns:
        (undocumented)
      • awaitAssert

        public <A> A awaitAssert​(java.time.Duration max,
                                 java.time.Duration interval,
                                 java.util.function.Supplier<A> supplier)
        Description copied from class: TestProbe
        Evaluate the given assert every interval until it does not throw an exception and return the result.

        If the max timeout expires the last exception is thrown.

        Note that the timeout is scaled using the configuration entry "akka.actor.testkit.typed.timefactor".

        Specified by:
        awaitAssert in class TestProbe<M>
        Parameters:
        max - (undocumented)
        interval - (undocumented)
        supplier - (undocumented)
        Returns:
        (undocumented)
      • awaitAssert

        public <A> A awaitAssert​(java.time.Duration max,
                                 java.util.function.Supplier<A> supplier)
        Description copied from class: TestProbe
        Evaluate the given assert every 100 milliseconds until it does not throw an exception and return the result.

        If the max timeout expires the last exception is thrown.

        Note that the timeout is scaled using the configuration entry "akka.actor.testkit.typed.timefactor".

        Specified by:
        awaitAssert in class TestProbe<M>
        Parameters:
        max - (undocumented)
        supplier - (undocumented)
        Returns:
        (undocumented)
      • awaitAssert

        public <A> A awaitAssert​(java.util.function.Supplier<A> supplier)
        Description copied from class: TestProbe
        Evaluate the given assert every 100 milliseconds until it does not throw an exception and return the result. A max time is taken it from the innermost enclosing within block.
        Specified by:
        awaitAssert in class TestProbe<M>
        Parameters:
        supplier - (undocumented)
        Returns:
        (undocumented)
      • stop

        public void stop()
        Description copied from class: TestProbe
        Stops the TestProbe.getRef, which is useful when testing watch and termination.
        Specified by:
        stop in interface TestProbe<M>
        Specified by:
        stop in class TestProbe<M>