Skip to content

Commit

Permalink
test: fix intermittent test_replica_commit (#4350)
Browse files Browse the repository at this point in the history
  • Loading branch information
fraidev authored Jan 21, 2025
1 parent 87be61a commit 0a076f6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/fluvio-storage/src/replica.rs
Original file line number Diff line number Diff line change
Expand Up @@ -730,8 +730,13 @@ mod tests {
// record contains 2 batch
assert_eq!(replica.get_hw(), 2);

// allow time for checkpoint to write
sleep(Duration::from_millis(1000)).await;
drop(replica);

// wait until checkpoint is fully fully flushed
sleep(Duration::from_millis(1000)).await;

// restore replica
let replica = create_replica("test", 0, option).await;
assert_eq!(replica.get_hw(), 2);
Expand Down

0 comments on commit 0a076f6

Please sign in to comment.