Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

check whether mailbox is empty at end of unit test

  • Loading branch information...
commit 7464997373b8a897736619445a90621b6efd0b41 1 parent e1f51dc
@Neverlord Neverlord authored
Showing with 9 additions and 1 deletion.
  1. +9 −1 unit_testing/test__sync_send.cpp
View
10 unit_testing/test__sync_send.cpp
@@ -132,12 +132,20 @@ int main() {
others() >> CPPA_UNEXPECTED_MSG_CB()
);
// we should have received two DOWN messages with normal exit reason
+ // plus 'NoWay'
int i = 0;
- receive_for(i, 2) (
+ receive_for(i, 3) (
on(atom("DOWN"), exit_reason::normal) >> CPPA_CHECKPOINT_CB(),
+ on(atom("NoWay")) >> CPPA_CHECKPOINT_CB(),
others() >> CPPA_UNEXPECTED_MSG_CB(),
after(std::chrono::seconds(0)) >> CPPA_UNEXPECTED_TOUT_CB()
);
+ CPPA_CHECKPOINT();
+ // mailbox should be empty now
+ receive (
+ others() >> CPPA_UNEXPECTED_MSG_CB(),
+ after(std::chrono::seconds(0)) >> CPPA_CHECKPOINT_CB()
+ );
shutdown();
return CPPA_TEST_RESULT;
}
Please sign in to comment.
Something went wrong with that request. Please try again.