diff --git a/rustfs/src/app/capacity_dirty_scope_test.rs b/rustfs/src/app/capacity_dirty_scope_test.rs index 92a364444..6bff49992 100644 --- a/rustfs/src/app/capacity_dirty_scope_test.rs +++ b/rustfs/src/app/capacity_dirty_scope_test.rs @@ -150,7 +150,6 @@ async fn data_movement_put_object_marks_dirty_disks_for_capacity_manager() { .expect("data movement put_object should succeed"); let dirty_disks = manager.get_dirty_disks().await; - assert_eq!(dirty_disks.len(), disk_paths.len()); let actual_paths: HashSet<_> = dirty_disks .into_iter() @@ -160,7 +159,12 @@ async fn data_movement_put_object_marks_dirty_disks_for_capacity_manager() { .iter() .map(|path| stdfs::canonicalize(path).unwrap().to_string_lossy().into_owned()) .collect(); - assert_eq!(actual_paths, expected_paths); + // The global dirty scope registry is process-wide; concurrent tests may + // add extra entries, so we only verify that our expected paths are present. + assert!( + expected_paths.is_subset(&actual_paths), + "expected dirty disks {expected_paths:?} to be a subset of {actual_paths:?}" + ); } #[tokio::test]