mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-26 08:18:18 +00:00
fix: auto-repair test_rename_data_shares_file_sync_limit hang on macOS (#4758)
fix(test): use canonicalized disk root for file_sync_probe in rename_data test On macOS, tempfile::tempdir returns /var/folders/... while LocalDisk resolves the root to /private/var/folders/... via dunce::canonicalize. The file_sync_probe::enter() path check uses starts_with(), so passing the non-canonical tempdir path caused the probe to never activate, making wait_for_active() hang indefinitely. Use disk.root (already canonicalized) for the probe instead.
This commit is contained in:
@@ -9039,7 +9039,11 @@ mod test {
|
||||
}
|
||||
}
|
||||
|
||||
let _probe = os::file_sync_probe::set_blocking(dir.path());
|
||||
// Use the disk's canonicalized root path — on macOS, tempfile returns
|
||||
// /var/folders/... while LocalDisk resolves to /private/var/folders/...
|
||||
// via dunce::canonicalize. The probe's starts_with check would fail
|
||||
// with the non-canonical path, causing wait_for_active to hang.
|
||||
let _probe = os::file_sync_probe::set_blocking(&disk.root);
|
||||
let first = {
|
||||
let disk = disk.clone();
|
||||
tokio::spawn(async move {
|
||||
|
||||
Reference in New Issue
Block a user