From 810f2da94c4182273b25c4f62bd00e31c2e5b664 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 17 Mar 2023 15:39:17 +0100 Subject: [PATCH 1/4] Ignore flaky test Signed-off-by: Oliver Tale-Yazdi --- bin/node/cli/tests/running_the_node_and_interrupt.rs | 3 +++ client/network/test/src/service.rs | 3 +++ client/rpc-spec-v2/src/chain_head/tests.rs | 6 ++++++ client/service/test/src/client/mod.rs | 3 +++ 4 files changed, 15 insertions(+) diff --git a/bin/node/cli/tests/running_the_node_and_interrupt.rs b/bin/node/cli/tests/running_the_node_and_interrupt.rs index 3d5598f3fbe23..fa42d4e06e17b 100644 --- a/bin/node/cli/tests/running_the_node_and_interrupt.rs +++ b/bin/node/cli/tests/running_the_node_and_interrupt.rs @@ -28,6 +28,9 @@ use tempfile::tempdir; pub mod common; #[tokio::test] +#[cfg(disable_flaky)] +#[allow(dead_code)] +// FIXME: https://github.com/paritytech/substrate/issues/11321 async fn running_the_node_works_and_can_be_interrupted() { common::run_with_timeout(Duration::from_secs(60 * 10), async move { async fn run_command_and_kill(signal: Signal) { diff --git a/client/network/test/src/service.rs b/client/network/test/src/service.rs index b1de2a91ebcc9..c87314a0cddc1 100644 --- a/client/network/test/src/service.rs +++ b/client/network/test/src/service.rs @@ -478,6 +478,9 @@ async fn lots_of_incoming_peers_works() { } #[tokio::test] +#[cfg(disable_flaky)] +#[allow(dead_code)] +// FIXME: https://github.com/paritytech/substrate/issues/11321 async fn notifications_back_pressure() { // Node 1 floods node 2 with notifications. Random sleeps are done on node 2 to simulate the // node being busy. We make sure that all notifications are received. diff --git a/client/rpc-spec-v2/src/chain_head/tests.rs b/client/rpc-spec-v2/src/chain_head/tests.rs index fcd906dcf5be0..0110c97a05910 100644 --- a/client/rpc-spec-v2/src/chain_head/tests.rs +++ b/client/rpc-spec-v2/src/chain_head/tests.rs @@ -1024,6 +1024,9 @@ async fn follow_prune_best_block() { } #[tokio::test] +#[cfg(disable_flaky)] +#[allow(dead_code)] +// FIXME: https://github.com/paritytech/substrate/issues/11321 async fn follow_forks_pruned_block() { let builder = TestClientBuilder::new(); let backend = builder.backend(); @@ -1137,6 +1140,9 @@ async fn follow_forks_pruned_block() { } #[tokio::test] +#[cfg(disable_flaky)] +#[allow(dead_code)] +// FIXME: https://github.com/paritytech/substrate/issues/11321 async fn follow_report_multiple_pruned_block() { let builder = TestClientBuilder::new(); let backend = builder.backend(); diff --git a/client/service/test/src/client/mod.rs b/client/service/test/src/client/mod.rs index cae69413c7a02..6e4f78f95a11a 100644 --- a/client/service/test/src/client/mod.rs +++ b/client/service/test/src/client/mod.rs @@ -1567,6 +1567,9 @@ fn respects_block_rules() { } #[test] +#[cfg(disable_flaky)] +#[allow(dead_code)] +// FIXME: https://github.com/paritytech/substrate/issues/11321 fn returns_status_for_pruned_blocks() { sp_tracing::try_init_simple(); let tmp = tempfile::tempdir().unwrap(); From 71efc2fd40392b5fc236e2248480abda1d9c4e2e Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 17 Mar 2023 15:52:10 +0100 Subject: [PATCH 2/4] Re-enable running_the_node_works_and_can_be_interrupted Signed-off-by: Oliver Tale-Yazdi --- bin/node/cli/tests/running_the_node_and_interrupt.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/bin/node/cli/tests/running_the_node_and_interrupt.rs b/bin/node/cli/tests/running_the_node_and_interrupt.rs index fa42d4e06e17b..3d5598f3fbe23 100644 --- a/bin/node/cli/tests/running_the_node_and_interrupt.rs +++ b/bin/node/cli/tests/running_the_node_and_interrupt.rs @@ -28,9 +28,6 @@ use tempfile::tempdir; pub mod common; #[tokio::test] -#[cfg(disable_flaky)] -#[allow(dead_code)] -// FIXME: https://github.com/paritytech/substrate/issues/11321 async fn running_the_node_works_and_can_be_interrupted() { common::run_with_timeout(Duration::from_secs(60 * 10), async move { async fn run_command_and_kill(signal: Signal) { From f722f17dfdeeaa13dba3d76f22b415ade3402d23 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 17 Mar 2023 15:53:25 +0100 Subject: [PATCH 3/4] Re-enable notifications_back_pressure Signed-off-by: Oliver Tale-Yazdi --- client/network/test/src/service.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/client/network/test/src/service.rs b/client/network/test/src/service.rs index c87314a0cddc1..b1de2a91ebcc9 100644 --- a/client/network/test/src/service.rs +++ b/client/network/test/src/service.rs @@ -478,9 +478,6 @@ async fn lots_of_incoming_peers_works() { } #[tokio::test] -#[cfg(disable_flaky)] -#[allow(dead_code)] -// FIXME: https://github.com/paritytech/substrate/issues/11321 async fn notifications_back_pressure() { // Node 1 floods node 2 with notifications. Random sleeps are done on node 2 to simulate the // node being busy. We make sure that all notifications are received. From 81ef3cb291a2854730b2398803fe87f23230c7c4 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Fri, 17 Mar 2023 16:06:13 +0100 Subject: [PATCH 4/4] Unused import Signed-off-by: Oliver Tale-Yazdi --- client/service/test/src/client/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/service/test/src/client/mod.rs b/client/service/test/src/client/mod.rs index 6e4f78f95a11a..96a0a8fe2a023 100644 --- a/client/service/test/src/client/mod.rs +++ b/client/service/test/src/client/mod.rs @@ -30,7 +30,7 @@ use sc_consensus::{ }; use sc_service::client::{new_in_mem, Client, LocalCallExecutor}; use sp_api::ProvideRuntimeApi; -use sp_consensus::{BlockOrigin, BlockStatus, Error as ConsensusError, SelectChain}; +use sp_consensus::{BlockOrigin, Error as ConsensusError, SelectChain}; use sp_core::{testing::TaskExecutor, traits::CallContext, H256}; use sp_runtime::{ generic::BlockId, @@ -1571,6 +1571,7 @@ fn respects_block_rules() { #[allow(dead_code)] // FIXME: https://github.com/paritytech/substrate/issues/11321 fn returns_status_for_pruned_blocks() { + use sc_consensus::BlockStatus; sp_tracing::try_init_simple(); let tmp = tempfile::tempdir().unwrap();