Add receiveN to JavaTestKit. Fixes #3029
This commit is contained in:
parent
44808c17ed
commit
b6c1527cbd
4 changed files with 56 additions and 4 deletions
|
|
@ -206,6 +206,11 @@ public class TestKitDocTest {
|
|||
final Number j = expectMsgAnyClassOf(Integer.class, Long.class);
|
||||
expectNoMsg();
|
||||
//#test-expect
|
||||
getRef().tell("receveN-1", null);
|
||||
getRef().tell("receveN-2", null);
|
||||
//#test-expect
|
||||
final Object[] two = receiveN(2);
|
||||
//#test-expect
|
||||
assertEquals("hello", hello);
|
||||
assertEquals("hello", any);
|
||||
assertEquals(42, i);
|
||||
|
|
|
|||
|
|
@ -235,6 +235,11 @@ obey the innermost enclosing :class:`Within` as detailed :ref:`below
|
|||
message has been received before calling this method which has not been
|
||||
removed from the queue using one of the other methods.
|
||||
|
||||
* :meth:`Object[] receiveN(int n, Duration max)`
|
||||
|
||||
``n`` messages must be received within the given time; the received
|
||||
messages are returned.
|
||||
|
||||
For cases which require more refined conditions there are constructs which take
|
||||
code blocks:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue