Skip to content

Commit

Permalink
Fix Snowbridge benchmark tests (paritytech#7296)
Browse files Browse the repository at this point in the history
Related to:
paritytech#7295 (comment)

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Adrian Catangiu <adrian@parity.io>
  • Loading branch information
3 people authored Jan 29, 2025
1 parent ada12be commit 1d05b9a
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -394,10 +394,14 @@ 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"))]
type MessageProcessor =
pallet_message_queue::mock_helpers::NoopMessageProcessor<AggregateMessageOrigin>;
#[cfg(not(feature = "runtime-benchmarks"))]
#[cfg(any(feature = "std", not(feature = "runtime-benchmarks")))]
type MessageProcessor = bridge_hub_common::BridgeHubMessageRouter<
xcm_builder::ProcessXcmMessage<
AggregateMessageOrigin,
Expand Down

0 comments on commit 1d05b9a

Please sign in to comment.