refactor(storage-api): remove namespace lock from StorageAPI (#3365)

* refactor(storage-api): remove namespace lock from StorageAPI

* test(scanner): wait for runtime budget cancellation

---------

Co-authored-by: loverustfs <hello@rustfs.com>
This commit is contained in:
安正超
2026-06-11 22:42:12 +08:00
committed by GitHub
parent 82af181dcf
commit a85cc0354c
14 changed files with 126 additions and 106 deletions
+5 -2
View File
@@ -184,11 +184,14 @@ mod tests {
},
);
tokio::time::sleep(Duration::from_millis(10)).await;
let token = budget.token();
tokio::time::timeout(Duration::from_secs(1), token.cancelled())
.await
.expect("runtime budget did not cancel child token");
assert!(budget.budget_elapsed());
assert_eq!(budget.reason(), Some(ScannerCycleBudgetReason::Runtime));
assert!(budget.token().is_cancelled());
assert!(token.is_cancelled());
}
#[test]