mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 00:17:56 +00:00
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:
committed by
GitHub
parent
21cec309a4
commit
9fda6cb416
@@ -13,6 +13,7 @@ keystore = { package = "sc-keystore", git = "https://github.com/paritytech/subst
|
||||
polkadot-primitives = { path = "../../../primitives" }
|
||||
polkadot-node-primitives = { path = "../../primitives" }
|
||||
polkadot-subsystem = { package = "polkadot-node-subsystem", path = "../../subsystem" }
|
||||
polkadot-node-subsystem-util = { path = "../../subsystem-util" }
|
||||
erasure-coding = { package = "polkadot-erasure-coding", path = "../../../erasure-coding" }
|
||||
statement-table = { package = "polkadot-statement-table", path = "../../../statement-table" }
|
||||
derive_more = "0.99.9"
|
||||
@@ -24,4 +25,4 @@ sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
futures = { version = "0.3.5", features = ["thread-pool"] }
|
||||
assert_matches = "1.3.0"
|
||||
polkadot-subsystem = { package = "polkadot-node-subsystem", path = "../../subsystem", features = [ "test-helpers" ] }
|
||||
polkadot-node-subsystem-test-helpers = { path = "../../subsystem-test-helpers" }
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user