break out subsystem-util and subsystem-test-helpers into individual crates (#1553)

* break out subsystem-util and subsystem-test-helpers into individual crates

* cause all packages to check successfully
This commit is contained in:
Peter Goodspeed-Niklaus
2020-08-07 16:51:36 +02:00
committed by GitHub
parent 21cec309a4
commit 9fda6cb416
32 changed files with 212 additions and 97 deletions
+11 -11
View File
@@ -45,14 +45,14 @@ use polkadot_subsystem::{
ProvisionerMessage, RuntimeApiMessage, StatementDistributionMessage, ValidationFailed,
RuntimeApiRequest,
},
util::{
self,
request_session_index_for_child,
request_validator_groups,
request_validators,
request_from_runtime,
Validator,
},
};
use polkadot_node_subsystem_util::{
self as util,
request_session_index_for_child,
request_validator_groups,
request_validators,
request_from_runtime,
Validator,
delegated_subsystem,
};
use statement_table::{
@@ -896,13 +896,13 @@ mod tests {
}
struct TestHarness {
virtual_overseer: polkadot_subsystem::test_helpers::TestSubsystemContextHandle<CandidateBackingMessage>,
virtual_overseer: polkadot_node_subsystem_test_helpers::TestSubsystemContextHandle<CandidateBackingMessage>,
}
fn test_harness<T: Future<Output=()>>(keystore: KeyStorePtr, test: impl FnOnce(TestHarness) -> T) {
let pool = sp_core::testing::TaskExecutor::new();
let (context, virtual_overseer) = polkadot_subsystem::test_helpers::make_subsystem_context(pool.clone());
let (context, virtual_overseer) = polkadot_node_subsystem_test_helpers::make_subsystem_context(pool.clone());
let subsystem = CandidateBackingSubsystem::run(context, keystore, pool.clone());
@@ -960,7 +960,7 @@ mod tests {
// Tests that the subsystem performs actions that are requied on startup.
async fn test_startup(
virtual_overseer: &mut polkadot_subsystem::test_helpers::TestSubsystemContextHandle<CandidateBackingMessage>,
virtual_overseer: &mut polkadot_node_subsystem_test_helpers::TestSubsystemContextHandle<CandidateBackingMessage>,
test_state: &TestState,
) {
// Start work on some new parent.