From b02b4754c027bd751825c8e3b96766a5898187b1 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Mon, 4 Mar 2024 10:54:38 +0000 Subject: test: ensure failed tests timeout resolve a long standing test issue where failures to output the correct message in the cli would result in the test never ending rather than failing the many test cases updated in this change are to ensure failures are caught rather than ignored some of them are just refactored to remove calling an extra function, which is no longer needed note: this doesn't fix the intermittent issue, most commonly experienced under the nix configuration, where tests that should pass occationally never end preventing the rest of the suite from running --- tests/init.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'tests/init.rs') diff --git a/tests/init.rs b/tests/init.rs index 7c69784..2083c82 100644 --- a/tests/init.rs +++ b/tests/init.rs @@ -441,7 +441,9 @@ mod when_repo_not_previously_claimed { mod cli_ouput { use super::*; - async fn run_test_async() -> Result<()> { + #[tokio::test] + #[serial] + async fn check_cli_output() -> Result<()> { let git_repo = prep_git_repo()?; // fallback (51,52) user write (53, 55) repo (55, 56) blaster (57) @@ -504,13 +506,6 @@ mod when_repo_not_previously_claimed { cli_tester_handle.join().unwrap()?; Ok(()) } - - #[tokio::test] - #[serial] - async fn check_cli_output() -> Result<()> { - run_test_async().await?; - Ok(()) - } } } // TODO: cli caputuring input -- cgit v1.2.3