Commit e896953f authored by Dominik Charousset's avatar Dominik Charousset

added shutdown handshake to test_remote_actor

the added shutdown handshake fixes a possible unit test failure
(remote actor calls `shutdown` before final message was sent)
parent c436fa39
......@@ -213,8 +213,9 @@ int client_part(const vector<string_pair>& args) {
forward_to(fwd);
}
);
// shutdown handshake
send(server, atom("farewell"));
receive(on(atom("cu")) >> [] { });
shutdown();
return CPPA_TEST_RESULT();
}
......@@ -329,11 +330,7 @@ int main(int argc, char** argv) {
CPPA_PRINT("test group communication via network (inverted setup)");
spawn5_server(remote_client, true);
self->on_sync_failure([&] {
CPPA_ERROR("unexpected message: "
<< to_string(self->last_dequeued())
<< endl);
});
self->on_sync_failure(CPPA_UNEXPECTED_MSG_CB());
// test forward_to "over network and back"
CPPA_PRINT("test forwarding over network 'and back'");
......@@ -348,9 +345,10 @@ int main(int argc, char** argv) {
);
CPPA_PRINT("wait for a last goodbye");
receive (
on(atom("farewell")) >> [] { }
);
receive(on(atom("farewell")) >> [&] {
send(remote_client, atom("cu"));
CPPA_CHECKPOINT();
});
// wait until separate process (in sep. thread) finished execution
if (run_remote_actor) child.join();
shutdown();
......
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