Skip to content

Commit

Permalink
progress could potentially decrease
Browse files Browse the repository at this point in the history
  • Loading branch information
kwannoel committed Jan 30, 2024
1 parent d41203b commit 95f3f00
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/tests/simulation/tests/integration_tests/backfill_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,11 @@ async fn test_arrangement_backfill_progress() -> Result<()> {
.await?;
let progress = progress.replace('%', "");
let progress = progress.parse::<f64>().unwrap();
assert!((1.0..2.0).contains(&progress));
assert!(
(1.0..2.0).contains(&progress),
"progress not within bounds {}",
progress
);

// Trigger recovery and test it again.
kill_cn_and_wait_recover(&cluster).await;
Expand All @@ -273,7 +277,11 @@ async fn test_arrangement_backfill_progress() -> Result<()> {
.await?;
let progress = progress.replace('%', "");
let progress = progress.parse::<f64>().unwrap();
assert!((prev_progress..prev_progress + 1.5).contains(&progress));
assert!(
(prev_progress - 0.5..prev_progress + 1.5).contains(&progress),
"progress not within bounds {}",
progress
);

Ok(())
}

0 comments on commit 95f3f00

Please sign in to comment.