Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
4e2e66cc
Commit
4e2e66cc
authored
Aug 27, 2015
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always prefer CAF_MESSAGE over CAF_TEST_VERBOSE
parent
7ca6a803
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
22 deletions
+22
-22
libcaf_core/test/dynamic_spawn.cpp
libcaf_core/test/dynamic_spawn.cpp
+2
-2
libcaf_io/test/automatic_connection.cpp
libcaf_io/test/automatic_connection.cpp
+14
-14
libcaf_io/test/basp.cpp
libcaf_io/test/basp.cpp
+5
-5
libcaf_io/test/remote_spawn.cpp
libcaf_io/test/remote_spawn.cpp
+1
-1
No files found.
libcaf_core/test/dynamic_spawn.cpp
View file @
4e2e66cc
...
...
@@ -747,7 +747,7 @@ CAF_TEST(constructor_attach) {
}
},
others
>>
[
=
]
{
CAF_
TEST_VERBOS
E
(
"forward to testee: "
CAF_
MESSAG
E
(
"forward to testee: "
<<
to_string
(
current_message
()));
forward_to
(
testee_
);
}
...
...
@@ -755,7 +755,7 @@ CAF_TEST(constructor_attach) {
}
void
on_exit
()
{
CAF_
TEST_VERBOS
E
(
"spawner::on_exit()"
);
CAF_
MESSAG
E
(
"spawner::on_exit()"
);
testee_
=
invalid_actor
;
}
...
...
libcaf_io/test/automatic_connection.cpp
View file @
4e2e66cc
...
...
@@ -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_VERBOS
E
(
"published testee at port "
<<
port
);
CAF_
MESSAG
E
(
"published testee at port "
<<
port
);
std
::
thread
mars_process
;
std
::
thread
jupiter_process
;
// launch process for Mars
if
(
!
as_server
)
{
CAF_
TEST_VERBOS
E
(
"launch process for Mars"
);
CAF_
MESSAG
E
(
"launch process for Mars"
);
mars_process
=
run_prog
(
"--mars"
,
port
,
use_asio
);
}
CAF_
TEST_VERBOS
E
(
"wait for Mars to connect"
);
CAF_
MESSAG
E
(
"wait for Mars to connect"
);
node_id
mars
;
self
->
receive
(
[
&
](
put_atom
,
const
node_id
&
nid
)
{
mars
=
nid
;
CAF_
TEST_VERBOS
E
(
CAF_TSARG
(
mars
));
CAF_
MESSAG
E
(
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_VERBOS
E
(
CAF_TSARG
(
mars_addr
));
CAF_
MESSAG
E
(
CAF_TSARG
(
mars_addr
));
self
->
sync_send
(
actor_cast
<
actor
>
(
mars_addr
),
get_atom
::
value
).
await
(
[
&
](
uint16_t
mp
)
{
CAF_
TEST_VERBOS
E
(
"mars published its actor at port "
<<
mp
);
CAF_
MESSAG
E
(
"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_VERBOS
E
(
"launch process for Jupiter"
);
CAF_
MESSAG
E
(
"launch process for Jupiter"
);
jupiter_process
=
run_prog
(
"--jupiter"
,
mars_port
,
use_asio
);
}
CAF_
TEST_VERBOS
E
(
"wait for Jupiter to connect"
);
CAF_
MESSAG
E
(
"wait for Jupiter to connect"
);
self
->
receive
(
[](
put_atom
,
const
node_id
&
jupiter
)
{
CAF_
TEST_VERBOS
E
(
CAF_TSARG
(
jupiter
));
CAF_
MESSAG
E
(
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_VERBOS
E
(
CAF_TSARG
(
jupiter_addr
));
CAF_
MESSAG
E
(
CAF_TSARG
(
jupiter_addr
));
}
);
}
);
CAF_
TEST_VERBOS
E
(
"shutdown Mars"
);
CAF_
MESSAG
E
(
"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_VERBOS
E
(
"check whether we still can talk to Jupiter"
);
CAF_
MESSAG
E
(
"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_VERBOS
E
(
"shutdown Jupiter"
);
CAF_
MESSAG
E
(
"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_VERBOS
E
(
"published testee at port "
<<
port
);
CAF_
MESSAG
E
(
"published testee at port "
<<
port
);
auto
earth
=
remote_actor
(
"localhost"
,
port_to_earth
);
send_as
(
aut
,
earth
,
ping_atom
::
value
,
aut
,
false
);
}
...
...
libcaf_io/test/basp.cpp
View file @
4e2e66cc
...
...
@@ -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_VERBOS
E
(
"this node: "
<<
to_string
(
this_node_
));
CAF_
MESSAG
E
(
"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_VERBOS
E
(
"output buffer has "
<<
ob
.
size
()
<<
" bytes"
);
CAF_
MESSAG
E
(
"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_VERBOS
E
(
"erase "
<<
std
::
distance
(
ob
.
begin
(),
end
)
CAF_
MESSAG
E
(
"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_VERBOS
E
(
"exec message of forwarding proxy"
);
CAF_
MESSAG
E
(
"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_VERBOS
E
(
"server handshake => client handshake + proxy announcement"
);
CAF_
MESSAG
E
(
"server handshake => client handshake + proxy announcement"
);
auto
na
=
registry
()
->
named_actors
();
mock
(
remote_hdl
(
0
),
{
basp
::
message_type
::
server_handshake
,
0
,
basp
::
version
,
...
...
libcaf_io/test/remote_spawn.cpp
View file @
4e2e66cc
...
...
@@ -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_VERBOS
E
(
"run client program"
);
CAF_
MESSAG
E
(
"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
(),
"--"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment