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
7c77a514
Commit
7c77a514
authored
May 09, 2017
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check content of storages in multi-lane test
parent
aef389d5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
libcaf_core/test/multi_lane_streaming.cpp
libcaf_core/test/multi_lane_streaming.cpp
+38
-0
No files found.
libcaf_core/test/multi_lane_streaming.cpp
View file @
7c77a514
...
@@ -259,6 +259,23 @@ CAF_TEST(fork_setup) {
...
@@ -259,6 +259,23 @@ CAF_TEST(fork_setup) {
// Source is done, splitter remains open.
// Source is done, splitter remains open.
expect
((
stream_msg
::
close
),
from
(
src
).
to
(
splitter
).
with
());
expect
((
stream_msg
::
close
),
from
(
src
).
to
(
splitter
).
with
());
CAF_REQUIRE
(
!
sched
.
has_job
());
CAF_REQUIRE
(
!
sched
.
has_job
());
CAF_MESSAGE
(
"check content of storages"
);
self
->
send
(
d1
,
get_atom
::
value
);
sched
.
run_once
();
self
->
receive
(
[](
const
batch
&
xs
)
{
batch
ys
{{
"key1"
,
"a"
},
{
"key1"
,
"b"
},
{
"key1"
,
"c"
},
{
"key1"
,
"d"
}};
CAF_REQUIRE_EQUAL
(
xs
,
ys
);
}
);
self
->
send
(
d2
,
get_atom
::
value
);
sched
.
run_once
();
self
->
receive
(
[](
const
batch
&
xs
)
{
batch
ys
{{
"key2"
,
"a"
},
{
"key2"
,
"b"
},
{
"key2"
,
"c"
},
{
"key2"
,
"d"
}};
CAF_REQUIRE_EQUAL
(
xs
,
ys
);
}
);
CAF_MESSAGE
(
"spawn a second source"
);
CAF_MESSAGE
(
"spawn a second source"
);
auto
src2
=
sys
.
spawn
(
nores_streamer
,
splitter
);
auto
src2
=
sys
.
spawn
(
nores_streamer
,
splitter
);
sched
.
run_once
();
sched
.
run_once
();
...
@@ -300,6 +317,27 @@ CAF_TEST(fork_setup) {
...
@@ -300,6 +317,27 @@ CAF_TEST(fork_setup) {
// Source is done, splitter remains open.
// Source is done, splitter remains open.
expect
((
stream_msg
::
close
),
from
(
src2
).
to
(
splitter
).
with
());
expect
((
stream_msg
::
close
),
from
(
src2
).
to
(
splitter
).
with
());
CAF_REQUIRE
(
!
sched
.
has_job
());
CAF_REQUIRE
(
!
sched
.
has_job
());
CAF_MESSAGE
(
"check content of storages again"
);
self
->
send
(
d1
,
get_atom
::
value
);
sched
.
run_once
();
self
->
receive
(
[](
const
batch
&
xs
)
{
batch
ys0
{{
"key1"
,
"a"
},
{
"key1"
,
"b"
},
{
"key1"
,
"c"
},
{
"key1"
,
"d"
}};
auto
ys
=
ys0
;
ys
.
insert
(
ys
.
end
(),
ys0
.
begin
(),
ys0
.
end
());
// all elements twice
CAF_REQUIRE_EQUAL
(
xs
,
ys
);
}
);
self
->
send
(
d2
,
get_atom
::
value
);
sched
.
run_once
();
self
->
receive
(
[](
const
batch
&
xs
)
{
batch
ys0
{{
"key2"
,
"a"
},
{
"key2"
,
"b"
},
{
"key2"
,
"c"
},
{
"key2"
,
"d"
}};
auto
ys
=
ys0
;
ys
.
insert
(
ys
.
end
(),
ys0
.
begin
(),
ys0
.
end
());
// all elements twice
CAF_REQUIRE_EQUAL
(
xs
,
ys
);
}
);
CAF_MESSAGE
(
"shutdown"
);
CAF_MESSAGE
(
"shutdown"
);
anon_send_exit
(
splitter
,
exit_reason
::
kill
);
anon_send_exit
(
splitter
,
exit_reason
::
kill
);
sched
.
run
();
sched
.
run
();
...
...
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