Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
polkadot
Commits
075b3924
Verified
Commit
075b3924
authored
Aug 19, 2020
by
Andronik Ordian
Browse files
util: wait for both subsystem and test_future to finish
parent
eac833e4
Pipeline
#104266
failed with stages
in 9 minutes
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
node/subsystem-util/src/lib.rs
View file @
075b3924
...
...
@@ -1161,13 +1161,16 @@ mod tests {
futures
::
pin_mut!
(
subsystem
,
test_future
,
timeout
);
executor
::
block_on
(
async
move
{
futures
::
select!
{
_
=
test_future
.fuse
()
=>
(),
_
=
subsystem
.fuse
()
=>
(),
_
=
timeout
.fuse
()
=>
panic!
(
"test timed out instead of completing"
),
}
});
futures
::
executor
::
block_on
(
futures
::
future
::
select
(
// wait for both to finish
futures
::
future
::
join
(
subsystem
,
test_future
),
timeout
,
)
.then
(|
either
|
match
either
{
futures
::
future
::
Either
::
Right
(
_
)
=>
panic!
(
"test timed out instead of completing"
),
futures
::
future
::
Either
::
Left
(
_
)
=>
futures
::
future
::
ready
(()),
})
);
}
#[test]
...
...
@@ -1229,7 +1232,7 @@ mod tests {
test_harness
(
run_args
,
|
mut
overseer_handle
,
err_rx
|
async
move
{
// send to a non running job
overseer_handle
.send
(
FromOverseer
::
Communication
{
.send
(
FromOverseer
::
Communication
{
msg
:
Default
::
default
(),
})
.await
;
...
...
Andronik Ordian
@ordian
mentioned in commit
e8ac8106
·
Aug 19, 2020
mentioned in commit
e8ac8106
mentioned in commit e8ac81069ec56d5fa8bbcce7408cb60c8b46ab62
Toggle commit list
Andronik Ordian
@ordian
mentioned in commit
8e4e79f5
·
Aug 21, 2020
mentioned in commit
8e4e79f5
mentioned in commit 8e4e79f5c3401e1902f89ffff4e67359206e9a0f
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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