Commit 4e2e66cc authored by Dominik Charousset's avatar Dominik Charousset

Always prefer CAF_MESSAGE over CAF_TEST_VERBOSE

parent 7ca6a803
......@@ -747,7 +747,7 @@ CAF_TEST(constructor_attach) {
}
},
others >> [=] {
CAF_TEST_VERBOSE("forward to testee: "
CAF_MESSAGE("forward to testee: "
<< to_string(current_message()));
forward_to(testee_);
}
......@@ -755,7 +755,7 @@ CAF_TEST(constructor_attach) {
}
void on_exit() {
CAF_TEST_VERBOSE("spawner::on_exit()");
CAF_MESSAGE("spawner::on_exit()");
testee_ = invalid_actor;
}
......
......@@ -140,20 +140,20 @@ void run_earth(bool use_asio, bool as_server, uint16_t pub_port) {
middleman::instance()->add_hook<captain>(self);
auto aut = spawn(testee);
auto port = publish(aut, pub_port);
CAF_TEST_VERBOSE("published testee at port " << port);
CAF_MESSAGE("published testee at port " << port);
std::thread mars_process;
std::thread jupiter_process;
// launch process for Mars
if (! as_server) {
CAF_TEST_VERBOSE("launch process for Mars");
CAF_MESSAGE("launch process for Mars");
mars_process = run_prog("--mars", port, use_asio);
}
CAF_TEST_VERBOSE("wait for Mars to connect");
CAF_MESSAGE("wait for Mars to connect");
node_id mars;
self->receive(
[&](put_atom, const node_id& nid) {
mars = nid;
CAF_TEST_VERBOSE(CAF_TSARG(mars));
CAF_MESSAGE(CAF_TSARG(mars));
}
);
actor_addr mars_addr;
......@@ -166,10 +166,10 @@ void run_earth(bool use_asio, bool as_server, uint16_t pub_port) {
if (name != "testee")
return;
mars_addr = addr;
CAF_TEST_VERBOSE(CAF_TSARG(mars_addr));
CAF_MESSAGE(CAF_TSARG(mars_addr));
self->sync_send(actor_cast<actor>(mars_addr), get_atom::value).await(
[&](uint16_t mp) {
CAF_TEST_VERBOSE("mars published its actor at port " << mp);
CAF_MESSAGE("mars published its actor at port " << mp);
mars_port = mp;
}
);
......@@ -179,13 +179,13 @@ void run_earth(bool use_asio, bool as_server, uint16_t pub_port) {
);
// launch process for Jupiter
if (! as_server) {
CAF_TEST_VERBOSE("launch process for Jupiter");
CAF_MESSAGE("launch process for Jupiter");
jupiter_process = run_prog("--jupiter", mars_port, use_asio);
}
CAF_TEST_VERBOSE("wait for Jupiter to connect");
CAF_MESSAGE("wait for Jupiter to connect");
self->receive(
[](put_atom, const node_id& jupiter) {
CAF_TEST_VERBOSE(CAF_TSARG(jupiter));
CAF_MESSAGE(CAF_TSARG(jupiter));
}
);
actor_addr jupiter_addr;
......@@ -197,12 +197,12 @@ void run_earth(bool use_asio, bool as_server, uint16_t pub_port) {
if (name != "testee")
return;
jupiter_addr = addr;
CAF_TEST_VERBOSE(CAF_TSARG(jupiter_addr));
CAF_MESSAGE(CAF_TSARG(jupiter_addr));
}
);
}
);
CAF_TEST_VERBOSE("shutdown Mars");
CAF_MESSAGE("shutdown Mars");
anon_send_exit(mars_addr, exit_reason::kill);
if (mars_process.joinable())
mars_process.join();
......@@ -211,7 +211,7 @@ void run_earth(bool use_asio, bool as_server, uint16_t pub_port) {
CAF_CHECK_EQUAL(nid, mars);
}
);
CAF_TEST_VERBOSE("check whether we still can talk to Jupiter");
CAF_MESSAGE("check whether we still can talk to Jupiter");
self->send(aut, ping_atom::value, self, true);
std::set<actor_addr> found;
int i = 0;
......@@ -222,7 +222,7 @@ void run_earth(bool use_asio, bool as_server, uint16_t pub_port) {
);
std::set<actor_addr> expected{aut.address(), jupiter_addr};
CAF_CHECK_EQUAL(found, expected);
CAF_TEST_VERBOSE("shutdown Jupiter");
CAF_MESSAGE("shutdown Jupiter");
anon_send_exit(jupiter_addr, exit_reason::kill);
if (jupiter_process.joinable())
jupiter_process.join();
......@@ -233,7 +233,7 @@ void run_mars(uint16_t port_to_earth, uint16_t pub_port) {
auto aut = spawn(testee);
auto port = publish(aut, pub_port);
anon_send(aut, put_atom::value, port);
CAF_TEST_VERBOSE("published testee at port " << port);
CAF_MESSAGE("published testee at port " << port);
auto earth = remote_actor("localhost", port_to_earth);
send_as(aut, earth, ping_atom::value, aut, false);
}
......
......@@ -113,7 +113,7 @@ public:
auto mm = middleman::instance();
aut_ = mm->get_named_broker<basp_broker>(atom("_BASP"));
this_node_ = detail::singletons::get_node_id();
CAF_TEST_VERBOSE("this node: " << to_string(this_node_));
CAF_MESSAGE("this node: " << to_string(this_node_));
self_.reset(new scoped_actor);
// run the initialization message of the BASP broker
mpx_->exec_runnable();
......@@ -371,7 +371,7 @@ public:
buffer buf;
this_->to_payload(buf, xs...);
buffer& ob = this_->mpx()->output_buffer(hdl);
CAF_TEST_VERBOSE("output buffer has " << ob.size() << " bytes");
CAF_MESSAGE("output buffer has " << ob.size() << " bytes");
CAF_REQUIRE(ob.size() >= basp::header_size);
basp::header hdr;
{ // lifetime scope of source
......@@ -384,7 +384,7 @@ public:
auto first = ob.begin() + basp::header_size;
auto end = first + hdr.payload_len;
payload.assign(first, end);
CAF_TEST_VERBOSE("erase " << std::distance(ob.begin(), end)
CAF_MESSAGE("erase " << std::distance(ob.begin(), end)
<< " bytes from output buffer");
ob.erase(ob.begin(), end);
} else {
......@@ -495,7 +495,7 @@ CAF_TEST(client_handshake_and_dispatch) {
},
THROW_ON_UNEXPECTED(self())
);
CAF_TEST_VERBOSE("exec message of forwarding proxy");
CAF_MESSAGE("exec message of forwarding proxy");
mpx()->exec_runnable();
dispatch_out_buf(remote_hdl(0)); // deserialize and send message from out buf
pseudo_remote(0)->receive(
......@@ -543,7 +543,7 @@ CAF_TEST(remote_actor_and_send) {
mpx()->exec_runnable(); // process message in basp_broker
CAF_CHECK(mpx()->pending_scribes().count(make_pair("localhost", 4242)) == 0);
// build a fake server handshake containing the id of our first pseudo actor
CAF_TEST_VERBOSE("server handshake => client handshake + proxy announcement");
CAF_MESSAGE("server handshake => client handshake + proxy announcement");
auto na = registry()->named_actors();
mock(remote_hdl(0),
{basp::message_type::server_handshake, 0, basp::version,
......
......@@ -139,7 +139,7 @@ CAF_TEST(remote_spawn) {
port = io::publish(serv, port);
CAF_TEST_INFO("published server at port " << port);
if (r.opts.count("server") == 0) {
CAF_TEST_VERBOSE("run client program");
CAF_MESSAGE("run client program");
auto child = detail::run_program(invalid_actor, caf::test::engine::path(),
"-n", "-s", CAF_XSTR(CAF_SUITE),
"-r", test::engine::max_runtime(), "--",
......
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