mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-29 16:37:07 +00:00
test(ecstore): avoid virtual timeout for sync batch (#6551)
This commit is contained in:
@@ -6370,8 +6370,15 @@ mod tests {
|
|||||||
.await
|
.await
|
||||||
.expect("second waiter should enqueue during the configured wait budget");
|
.expect("second waiter should enqueue during the configured wait budget");
|
||||||
tokio::time::advance(wait_budget).await;
|
tokio::time::advance(wait_budget).await;
|
||||||
tokio::task::yield_now().await;
|
let batch_deadline = std::time::Instant::now() + Duration::from_secs(30);
|
||||||
file_sync_probe::wait_for_active(1).await;
|
while file_sync_probe::group_batches().is_empty() {
|
||||||
|
assert!(
|
||||||
|
std::time::Instant::now() < batch_deadline,
|
||||||
|
"timed out waiting for the wait-budget group batch; counts={:?}",
|
||||||
|
file_fdatasync_group_commit_counts_for_test()
|
||||||
|
);
|
||||||
|
tokio::task::yield_now().await;
|
||||||
|
}
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
file_sync_probe::group_batches(),
|
file_sync_probe::group_batches(),
|
||||||
|
|||||||
Reference in New Issue
Block a user