From 6aa77ae7a23e38a4fdde67c26a585b215f67e6a5 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 8 Jan 2024 13:18:01 +0100 Subject: [PATCH] tests: Mark a bunch of flaky tests (#1936) ## Description I think all of these are filesystem related. Issue filed in #1935 ## Notes & open questions ## Change checklist - [x] Self-review. - [x] Tests if relevant. --- iroh/tests/cli.rs | 10 +++++++++- iroh/tests/provide.rs | 10 ++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/iroh/tests/cli.rs b/iroh/tests/cli.rs index c4fc384260..5f5c806a00 100644 --- a/iroh/tests/cli.rs +++ b/iroh/tests/cli.rs @@ -31,6 +31,7 @@ fn make_rand_file(size: usize, path: &Path) -> Result { } #[test] +#[ignore = "flaky"] fn cli_provide_one_file_basic() -> Result<()> { let dir = testdir!(); let path = dir.join("foo"); @@ -40,7 +41,7 @@ fn cli_provide_one_file_basic() -> Result<()> { } #[test] -#[ignore] +#[ignore = "flaky"] fn cli_provide_one_file_large() -> Result<()> { let dir = testdir!(); let path = dir.join("foo"); @@ -51,6 +52,7 @@ fn cli_provide_one_file_large() -> Result<()> { /// Test single file download to a path #[test] +#[ignore = "flaky"] fn cli_provide_one_file_single_path() -> Result<()> { let dir = testdir!(); let path = dir.join("foo"); @@ -62,6 +64,7 @@ fn cli_provide_one_file_single_path() -> Result<()> { /// test single file download to stdout #[test] +#[ignore = "flaky"] fn cli_provide_one_file_single_stdout() -> Result<()> { let dir = testdir!(); let path = dir.join("foo"); @@ -73,6 +76,7 @@ fn cli_provide_one_file_single_stdout() -> Result<()> { } #[test] +#[ignore = "flaky"] fn cli_provide_folder() -> Result<()> { let path = testdir!().join("src"); std::fs::create_dir(&path)?; @@ -85,6 +89,7 @@ fn cli_provide_folder() -> Result<()> { } #[test] +#[ignore = "flaky"] fn cli_provide_tree() -> Result<()> { let path = testdir!().join("src"); std::fs::create_dir(&path)?; @@ -234,6 +239,7 @@ fn copy_blob_dirs(src: &Path, tgt: &Path) -> Result<()> { #[cfg(feature = "flat-db")] #[test] +#[ignore = "flaky"] fn cli_provide_tree_resume() -> Result<()> { /// Get all matches for match group 1 (an explicitly defined match group) fn explicit_matches(matches: Vec<(usize, Vec)>) -> Vec { @@ -337,6 +343,7 @@ fn cli_provide_tree_resume() -> Result<()> { #[cfg(feature = "flat-db")] #[test] +#[ignore = "flaky"] fn cli_provide_file_resume() -> Result<()> { /// Get all matches for match group 1 (an explicitly defined match group) fn explicit_matches(matches: Vec<(usize, Vec)>) -> Vec { @@ -405,6 +412,7 @@ fn cli_provide_file_resume() -> Result<()> { } #[test] +#[ignore = "flaky"] fn cli_provide_from_stdin_to_stdout() -> Result<()> { let dir = testdir!(); let path = dir.join("foo"); diff --git a/iroh/tests/provide.rs b/iroh/tests/provide.rs index f9bec0190b..fc957ac8e3 100644 --- a/iroh/tests/provide.rs +++ b/iroh/tests/provide.rs @@ -45,6 +45,7 @@ fn test_node(db: D) -> Builder Result<()> { let _guard = iroh_test::logging::setup(); let lp = test_local_pool(); @@ -56,6 +57,7 @@ async fn basics() -> Result<()> { } #[tokio::test] +#[ignore = "flaky"] async fn multi_file() -> Result<()> { let _guard = iroh_test::logging::setup(); let lp = test_local_pool(); @@ -71,6 +73,7 @@ async fn multi_file() -> Result<()> { } #[tokio::test] +#[ignore = "flaky"] async fn many_files() -> Result<()> { let _guard = iroh_test::logging::setup(); let lp = test_local_pool(); @@ -90,6 +93,7 @@ async fn many_files() -> Result<()> { } #[tokio::test] +#[ignore = "flaky"] async fn sizes() -> Result<()> { let _guard = iroh_test::logging::setup(); let lp = test_local_pool(); @@ -116,6 +120,7 @@ async fn sizes() -> Result<()> { } #[tokio::test] +#[ignore = "flaky"] async fn empty_files() -> Result<()> { let lp = test_local_pool(); // try to transfer as many files as possible without hitting a limit @@ -385,6 +390,7 @@ fn create_test_db( } #[tokio::test] +#[ignore = "flaky"] async fn test_ipv6() { let _guard = iroh_test::logging::setup(); let lp = test_local_pool(); @@ -412,6 +418,7 @@ async fn test_ipv6() { /// Simulate a node that has nothing #[tokio::test] +#[ignore = "flaky"] async fn test_not_found() { let _ = iroh_test::logging::setup(); let lp = test_local_pool(); @@ -453,6 +460,7 @@ async fn test_not_found() { /// Simulate a node that has just begun downloading a blob, but does not yet have any data #[tokio::test] +#[ignore = "flaky"] async fn test_chunk_not_found_1() { let _ = iroh_test::logging::setup(); let lp = test_local_pool(); @@ -546,6 +554,7 @@ async fn run_collection_get_request( } #[tokio::test] +#[ignore = "flaky"] async fn test_run_fsm() { let lp = test_local_pool(); let (db, hash) = create_test_db([("a", b"hello"), ("b", b"world")]); @@ -620,6 +629,7 @@ async fn test_size_request_blob() { } #[tokio::test] +#[ignore = "flaky"] async fn test_collection_stat() { let lp = test_local_pool(); let child1 = make_test_data(123456);