Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snowbridge benchmark tests fix #3424

Merged
merged 7 commits into from
Feb 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ use polkadot_runtime_common::prod_or_fast;

#[cfg(feature = "runtime-benchmarks")]
use benchmark_helpers::DoNothingRouter;
#[cfg(not(feature = "runtime-benchmarks"))]
use bridge_hub_common::BridgeHubMessageRouter;

/// The address format for describing accounts.
pub type Address = MultiAddress<AccountId, ()>;
Expand Down Expand Up @@ -367,11 +365,15 @@ parameter_types! {
impl pallet_message_queue::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = weights::pallet_message_queue::WeightInfo<Runtime>;
#[cfg(feature = "runtime-benchmarks")]
// Use the NoopMessageProcessor exclusively for benchmarks, not for tests with the
// runtime-benchmarks feature as tests require the BridgeHubMessageRouter to process messages.
// The "test" feature flag doesn't work, hence the reliance on the "std" feature, which is
// enabled during tests.
#[cfg(all(not(feature = "std"), feature = "runtime-benchmarks"))]
acatangiu marked this conversation as resolved.
Show resolved Hide resolved
type MessageProcessor =
pallet_message_queue::mock_helpers::NoopMessageProcessor<AggregateMessageOrigin>;
#[cfg(not(feature = "runtime-benchmarks"))]
type MessageProcessor = BridgeHubMessageRouter<
#[cfg(not(all(not(feature = "std"), feature = "runtime-benchmarks")))]
type MessageProcessor = bridge_hub_common::BridgeHubMessageRouter<
xcm_builder::ProcessXcmMessage<
AggregateMessageOrigin,
xcm_executor::XcmExecutor<xcm_config::XcmConfig>,
Expand Down
Loading