Commit 74649973 authored by Dominik Charousset's avatar Dominik Charousset

check whether mailbox is empty at end of unit test

parent e1f51dc0
......@@ -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;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment