Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Fixup tests
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
  • Loading branch information
ggwpez committed Apr 11, 2023
1 parent b9c15e8 commit 88f1cbe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions runtime/parachains/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,12 @@ impl pallet_message_queue::WeightInfo for TestMessageQueueWeight {
fn execute_overweight_page_updated() -> Weight {
Weight::zero()
}
fn discard_overweight_page_removed() -> Weight {
Weight::zero()
}
fn discard_overweight_page_updated() -> Weight {
Weight::zero()
}
}
parameter_types! {
pub const MessageQueueServiceWeight: Weight = Weight::from_all(500);
Expand All @@ -328,6 +334,10 @@ impl pallet_message_queue::Config for Test {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = TestMessageQueueWeight;
type MessageProcessor = TestProcessMessage;
type DiscardOverweightOrigin = frame_support::traits::AsEnsureOriginWithContains<
frame_system::EnsureRoot<AccountId>,
frame_support::traits::Everything,
>;
type QueueChangeHandler = ParaInclusion;
type HeapSize = ConstU32<65536>;
type MaxStale = ConstU32<8>;
Expand Down
3 changes: 3 additions & 0 deletions runtime/rococo/src/weights/pallet_message_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ use sp_std::marker::PhantomData;
/// Weight functions for `pallet_message_queue`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_message_queue::WeightInfo for WeightInfo<T> {
fn discard_overweight_page_removed() -> Weight { Weight::MAX } // FAIL-CI
fn discard_overweight_page_updated() -> Weight { Weight::MAX } // FAIL-CI

/// Storage: MessageQueue ServiceHead (r:1 w:0)
/// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen)
/// Storage: MessageQueue BookStateFor (r:2 w:2)
Expand Down

0 comments on commit 88f1cbe

Please sign in to comment.