Skip to content

Commit

Permalink
tests: Mark a bunch of flaky tests (#1936)
Browse files Browse the repository at this point in the history
## 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.
  • Loading branch information
flub committed Jan 8, 2024
1 parent 02ead0a commit 6aa77ae
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
10 changes: 9 additions & 1 deletion iroh/tests/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ fn make_rand_file(size: usize, path: &Path) -> Result<Hash> {
}

#[test]
#[ignore = "flaky"]
fn cli_provide_one_file_basic() -> Result<()> {
let dir = testdir!();
let path = dir.join("foo");
Expand All @@ -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");
Expand All @@ -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");
Expand All @@ -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");
Expand All @@ -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)?;
Expand All @@ -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)?;
Expand Down Expand Up @@ -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<String>)>) -> Vec<String> {
Expand Down Expand Up @@ -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<String>)>) -> Vec<String> {
Expand Down Expand Up @@ -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");
Expand Down
10 changes: 10 additions & 0 deletions iroh/tests/provide.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ fn test_node<D: Store>(db: D) -> Builder<D, store::memory::Store, DummyServerEnd
}

#[tokio::test]
#[ignore = "flaky"]
async fn basics() -> Result<()> {
let _guard = iroh_test::logging::setup();
let lp = test_local_pool();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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")]);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 6aa77ae

Please sign in to comment.