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
12f2f796
Commit
12f2f796
authored
Jul 24, 2023
by
Samir Halilcevic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tried reproducing issue/1466
parent
6663fa62
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
libcaf_io/test/io/middleman.cpp
libcaf_io/test/io/middleman.cpp
+21
-0
No files found.
libcaf_io/test/io/middleman.cpp
View file @
12f2f796
...
...
@@ -117,4 +117,25 @@ CAF_TEST(failing to deserialize a request reports an error to the sender) {
anon_send_exit
(
testee
,
exit_reason
::
user_shutdown
);
}
CAF_TEST
(
failing
to
find
the
desitnation
reports
an
error
to
the
sender
)
{
auto
testee_impl
=
[]()
->
behavior
{
return
{
[](
int
a
)
{
return
a
;
},
};
};
auto
requester_impl
=
[](
event_based_actor
*
self
,
actor
buddy
)
{
self
->
request
(
buddy
,
caf
::
infinite
,
10
)
.
then
([](
int
a
)
{
CAF_FAIL
(
"Expected an error, received "
<<
a
);
},
[](
caf
::
error
&
err
)
{
CHECK_EQ
(
err
,
sec
::
malformed_message
);
});
};
auto
testee
=
earth
.
sys
.
spawn
(
testee_impl
);
earth
.
sys
.
registry
().
put
(
"testee"
,
testee
);
auto
testee_proxy_ptr
=
mars
.
mm
.
remote_lookup
(
"testee"
,
earth
.
sys
.
node
());
auto
testee_proxy
=
actor_cast
<
actor
>
(
testee_proxy_ptr
);
anon_send_exit
(
testee
,
exit_reason
::
user_shutdown
);
auto
buddy
=
mars
.
sys
.
spawn
(
requester_impl
,
testee_proxy
);
mars
.
sys
.
await_all_actors_done
();
anon_send_exit
(
buddy
,
exit_reason
::
user_shutdown
);
}
END_FIXTURE_SCOPE
()
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