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
0b610ed5
Commit
0b610ed5
authored
Aug 31, 2017
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix termination issue in OpenSSL test
parent
f7a7510a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
libcaf_openssl/test/authentication.cpp
libcaf_openssl/test/authentication.cpp
+9
-4
No files found.
libcaf_openssl/test/authentication.cpp
View file @
0b610ed5
...
@@ -174,6 +174,10 @@ struct fixture {
...
@@ -174,6 +174,10 @@ struct fixture {
auto
s
=
&
sys
==
&
server_side
?
ssched
:
csched
;
auto
s
=
&
sys
==
&
server_side
?
ssched
:
csched
;
s
->
after_next_enqueue
([
=
]
{
exec_loop
();
});
s
->
after_next_enqueue
([
=
]
{
exec_loop
();
});
}
}
bool
terminated
(
const
actor
&
x
)
{
return
x
?
x
->
getf
(
abstract_actor
::
is_terminated_flag
)
:
false
;
}
};
};
}
// namespace <anonymous>
}
// namespace <anonymous>
...
@@ -183,15 +187,15 @@ CAF_TEST_FIXTURE_SCOPE(authentication, fixture)
...
@@ -183,15 +187,15 @@ CAF_TEST_FIXTURE_SCOPE(authentication, fixture)
using
openssl
::
remote_actor
;
using
openssl
::
remote_actor
;
using
openssl
::
publish
;
using
openssl
::
publish
;
CAF_TEST
(
authentication_succes
)
{
CAF_TEST
(
authentication_succes
s
)
{
if
(
!
init
(
false
))
if
(
!
init
(
false
))
return
;
return
;
// server side
// server side
CAF_MESSAGE
(
"spawn pong on server"
);
CAF_MESSAGE
(
"spawn pong on server"
);
auto
spong
=
server_side
.
spawn
(
make_pong_behavior
);
auto
spong
=
server_side
.
spawn
(
make_pong_behavior
);
exec_loop
();
exec_loop
();
loop_after_next_enqueue
(
server_side
);
CAF_MESSAGE
(
"publish pong"
);
CAF_MESSAGE
(
"publish pong"
);
loop_after_next_enqueue
(
server_side
);
CAF_EXP_THROW
(
port
,
publish
(
spong
,
0
,
local_host
));
CAF_EXP_THROW
(
port
,
publish
(
spong
,
0
,
local_host
));
exec_loop
();
exec_loop
();
// client side
// client side
...
@@ -199,7 +203,8 @@ CAF_TEST(authentication_succes) {
...
@@ -199,7 +203,8 @@ CAF_TEST(authentication_succes) {
loop_after_next_enqueue
(
client_side
);
loop_after_next_enqueue
(
client_side
);
CAF_EXP_THROW
(
pong
,
remote_actor
(
client_side
,
local_host
,
port
));
CAF_EXP_THROW
(
pong
,
remote_actor
(
client_side
,
local_host
,
port
));
CAF_MESSAGE
(
"spawn ping and exchange messages"
);
CAF_MESSAGE
(
"spawn ping and exchange messages"
);
client_side
.
spawn
(
make_ping_behavior
,
pong
);
auto
sping
=
client_side
.
spawn
(
make_ping_behavior
,
pong
);
while
(
!
terminated
(
sping
))
exec_loop
();
exec_loop
();
CAF_MESSAGE
(
"terminate pong"
);
CAF_MESSAGE
(
"terminate pong"
);
anon_send_exit
(
spong
,
exit_reason
::
user_shutdown
);
anon_send_exit
(
spong
,
exit_reason
::
user_shutdown
);
...
...
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