mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 01:11:10 +00:00
jobs: don't early exit when there are no jobs (#1621)
* jobs: don't early exit when there are no jobs * utils: fix merged test * utils: less verbose * utils: add an assert subsystem is running * utils: use TimeoutExt from test-helpers * test-helpers: use TimeoutExt
This commit is contained in:
@@ -275,16 +275,13 @@ pub fn subsystem_test_harness<M, OverseerFactory, Overseer, TestFactory, Test>(
|
||||
let overseer = overseer_factory(handle);
|
||||
let test = test_factory(context);
|
||||
|
||||
let timeout = Delay::new(Duration::from_secs(2));
|
||||
|
||||
futures::pin_mut!(overseer, test, timeout);
|
||||
futures::pin_mut!(overseer, test);
|
||||
|
||||
futures::executor::block_on(async move {
|
||||
futures::select! {
|
||||
_ = overseer.fuse() => (),
|
||||
_ = test.fuse() => (),
|
||||
_ = timeout.fuse() => panic!("test timed out instead of completing"),
|
||||
}
|
||||
future::join(overseer, test)
|
||||
.timeout(Duration::from_secs(2))
|
||||
.await
|
||||
.expect("test timed out instead of completing")
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user