test: Actually make this test a different case, oops

pull/24376/head
Carol (Nichols || Goulding) 2023-03-15 17:10:10 -04:00
parent 6fd910a091
commit c9bfcb4501
No known key found for this signature in database
GPG Key ID: E907EE5A736F87D4
1 changed files with 6 additions and 6 deletions

View File

@ -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]