mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 07:58:00 +00:00
overseer becomes orchestra (#5542)
* rename overseer-gen to orchestra Also drop `gum` and use `tracing`. * make orchestra compile as standalone * introduce Spawner trait to split from sp_core Finalizes the independence of orchestra from polkadot-overseer * slip of the pen * other fixins * remove unused import * Update node/overseer/orchestra/proc-macro/src/impl_builder.rs Co-authored-by: Vsevolod Stakhov <vsevolod.stakhov@parity.io> * Update node/overseer/orchestra/proc-macro/src/impl_builder.rs Co-authored-by: Vsevolod Stakhov <vsevolod.stakhov@parity.io> * orchestra everywhere * leaky data * Bump scale-info from 2.1.1 to 2.1.2 (#5552) Bumps [scale-info](https://github.com/paritytech/scale-info) from 2.1.1 to 2.1.2. - [Release notes](https://github.com/paritytech/scale-info/releases) - [Changelog](https://github.com/paritytech/scale-info/blob/master/CHANGELOG.md) - [Commits](https://github.com/paritytech/scale-info/compare/v2.1.1...v2.1.2) --- updated-dependencies: - dependency-name: scale-info dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add missing markdown code block delimiter (#5555) * bitfield-signing: remove util::jobs usage (#5523) * Switch to pooling copy-on-write instantiation strategy for WASM (companion for Substrate#11232) (#5337) * Switch to pooling copy-on-write instantiation strategy for WASM * Fix compilation of `polkadot-test-service` * Update comments * Move `max_memory_size` to `Semantics` * Rename `WasmInstantiationStrategy` to `WasmtimeInstantiationStrategy` * Update a safety comment * update lockfile for {"substrate"} Co-authored-by: parity-processbot <> * Fix build Co-authored-by: Vsevolod Stakhov <vsevolod.stakhov@parity.io> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Malte Kliemann <mail@maltekliemann.com> Co-authored-by: Chris Sosnin <48099298+slumber@users.noreply.github.com> Co-authored-by: Koute <koute@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
d9eff4ecd4
commit
450ca2baca
@@ -23,7 +23,7 @@ use futures::{channel::mpsc, executor, future, Future, FutureExt, SinkExt, Strea
|
||||
use polkadot_node_jaeger as jaeger;
|
||||
use polkadot_node_subsystem::{
|
||||
messages::{AllMessages, CollatorProtocolMessage},
|
||||
ActivatedLeaf, ActiveLeavesUpdate, FromOverseer, LeafStatus, OverseerSignal, SpawnedSubsystem,
|
||||
ActivatedLeaf, ActiveLeavesUpdate, FromOrchestra, LeafStatus, OverseerSignal, SpawnedSubsystem,
|
||||
};
|
||||
use polkadot_node_subsystem_test_helpers::{self as test_helpers, make_subsystem_context};
|
||||
use polkadot_primitives::v2::Hash;
|
||||
@@ -143,7 +143,8 @@ fn test_harness<T: Future<Output = ()>>(run_args: bool, test: impl FnOnce(Overse
|
||||
let pool = sp_core::testing::TaskExecutor::new();
|
||||
let (context, overseer_handle) = make_subsystem_context(pool.clone());
|
||||
|
||||
let subsystem = FakeCollatorProtocolSubsystem::new(pool, run_args, ()).run(context);
|
||||
let subsystem =
|
||||
FakeCollatorProtocolSubsystem::new(overseer::SpawnGlue(pool), run_args, ()).run(context);
|
||||
let test_future = test(overseer_handle);
|
||||
|
||||
futures::pin_mut!(subsystem, test_future);
|
||||
@@ -162,7 +163,7 @@ fn starting_and_stopping_job_works() {
|
||||
|
||||
test_harness(true, |mut overseer_handle| async move {
|
||||
overseer_handle
|
||||
.send(FromOverseer::Signal(OverseerSignal::ActiveLeaves(
|
||||
.send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves(
|
||||
ActiveLeavesUpdate::start_work(ActivatedLeaf {
|
||||
hash: relay_parent,
|
||||
number: 1,
|
||||
@@ -173,12 +174,12 @@ fn starting_and_stopping_job_works() {
|
||||
.await;
|
||||
assert_matches!(overseer_handle.recv().await, AllMessages::CollatorProtocol(_));
|
||||
overseer_handle
|
||||
.send(FromOverseer::Signal(OverseerSignal::ActiveLeaves(
|
||||
.send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves(
|
||||
ActiveLeavesUpdate::stop_work(relay_parent),
|
||||
)))
|
||||
.await;
|
||||
|
||||
overseer_handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await;
|
||||
overseer_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -188,7 +189,7 @@ fn sending_to_a_non_running_job_do_not_stop_the_subsystem() {
|
||||
|
||||
test_harness(true, |mut overseer_handle| async move {
|
||||
overseer_handle
|
||||
.send(FromOverseer::Signal(OverseerSignal::ActiveLeaves(
|
||||
.send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves(
|
||||
ActiveLeavesUpdate::start_work(ActivatedLeaf {
|
||||
hash: relay_parent,
|
||||
number: 1,
|
||||
@@ -200,13 +201,13 @@ fn sending_to_a_non_running_job_do_not_stop_the_subsystem() {
|
||||
|
||||
// send to a non running job
|
||||
overseer_handle
|
||||
.send(FromOverseer::Communication { msg: Default::default() })
|
||||
.send(FromOrchestra::Communication { msg: Default::default() })
|
||||
.await;
|
||||
|
||||
// the subsystem is still alive
|
||||
assert_matches!(overseer_handle.recv().await, AllMessages::CollatorProtocol(_));
|
||||
|
||||
overseer_handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await;
|
||||
overseer_handle.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -216,7 +217,7 @@ fn test_subsystem_impl_and_name_derivation() {
|
||||
let (context, _) = make_subsystem_context::<CollatorProtocolMessage, _>(pool.clone());
|
||||
|
||||
let SpawnedSubsystem { name, .. } =
|
||||
FakeCollatorProtocolSubsystem::new(pool, false, ()).start(context);
|
||||
FakeCollatorProtocolSubsystem::new(overseer::SpawnGlue(pool), false, ()).start(context);
|
||||
assert_eq!(name, "fake-collator-protocol");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user