From c9bfcb4501242cff5cdae98325767c98ea1a6bf1 Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" Date: Wed, 15 Mar 2023 17:10:10 -0400 Subject: [PATCH] test: Actually make this test a different case, oops --- compactor2/src/driver.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/compactor2/src/driver.rs b/compactor2/src/driver.rs index 48b22772e0..9b275a27b6 100644 --- a/compactor2/src/driver.rs +++ b/compactor2/src/driver.rs @@ -632,15 +632,15 @@ mod tests { #[tokio::test] async fn doesnt_report_progress_returns_err_under_timeout() { - let state = timeout_with_progress_checking(Duration::from_millis(5), |tx| async move { - // No loop in this test; report progress and then return success to simulate - // successfully completing all work before the timeout. - let _ignore_send_errors = tx.send(true); - Result::<(), String>::Ok(()) + let state = timeout_with_progress_checking(Duration::from_millis(5), |_tx| async move { + Result::<(), String>::Err(String::from("there was a problem")) }) .await; - assert_matches!(state, TimeoutWithProgress::Completed(Ok(()))); + assert_matches!( + state, + TimeoutWithProgress::Completed(Err(e)) if e == "there was a problem" + ); } #[tokio::test]