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
fa755f75
Commit
fa755f75
authored
Dec 11, 2018
by
Joseph Noir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix hanging newb test
parent
d408143f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
libcaf_io/test/newb.cpp
libcaf_io/test/newb.cpp
+5
-6
No files found.
libcaf_io/test/newb.cpp
View file @
fa755f75
...
...
@@ -50,7 +50,6 @@ using expect_atom = atom_constant<atom("expect")>;
using
ordering_atom
=
atom_constant
<
atom
(
"ordering"
)
>
;
using
send_atom
=
atom_constant
<
atom
(
"send"
)
>
;
using
shutdown_atom
=
atom_constant
<
atom
(
"shutdown"
)
>
;
using
quit_atom
=
atom_constant
<
atom
(
"quit"
)
>
;
using
set_atom
=
atom_constant
<
atom
(
"set"
)
>
;
using
get_atom
=
atom_constant
<
atom
(
"get"
)
>
;
...
...
@@ -223,10 +222,10 @@ struct fixture {
CAF_TEST_FIXTURE_SCOPE
(
newb_basics
,
fixture
)
CAF_TEST
(
spawn
acceptor
)
{
auto
newb_
client
=
[]
(
newb_t
*
self
)
->
behavior
{
auto
newb_
server
=
[]
(
newb_t
*
self
)
->
behavior
{
return
{
[
=
](
quit_atom
)
{
self
->
stop
();
[
=
](
int
i
)
{
// nop, this is never used
},
};
};
...
...
@@ -234,11 +233,11 @@ CAF_TEST(spawn acceptor) {
auto
esock
=
network
::
new_local_udp_endpoint_impl
(
0
,
nullptr
);
accept_ptr
<
new_basp_msg
>
accept
{
new
dummy_accept
<
new_basp_msg
>
};
CAF_REQUIRE
(
esock
);
auto
n
=
spawn_acceptor
<
protocol_t
>
(
sys
,
newb_
client
,
std
::
move
(
accept
),
auto
n
=
spawn_acceptor
<
protocol_t
>
(
sys
,
newb_
server
,
std
::
move
(
accept
),
esock
->
first
);
exec_all
();
scoped_actor
self
{
sys
};
self
->
send
(
n
,
quit_atom
::
value
);
self
->
send
_exit
(
n
,
exit_reason
::
user_shutdown
);
exec_all
();
}
...
...
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