mirror of
https://github.com/rustfs/rustfs.git
synced 2026-09-07 20:46:11 +00:00
test(ecstore): align heal capacity admission regression (#7386)
Align the suspended-owner heal regression with read-only pool metadata admission semantics. The quorum-boundary case now asserts that heal fails the current capacity admission without latching the global pool metadata writer. Co-authored-by: zhi22915 <qiuzgang@gmail.com>
This commit is contained in:
@@ -2353,12 +2353,18 @@ mod tests {
|
||||
.await
|
||||
.expect("quorum boundary heal should return a mapped result");
|
||||
*store.pools[0].disk_set[0].disks.write().await = original_quorum_disks;
|
||||
let quorum_err_text = quorum_err.as_ref().map(ToString::to_string);
|
||||
assert!(
|
||||
quorum_err.as_ref().is_some_and(|err| err
|
||||
.to_string()
|
||||
.contains("pool metadata writes remain blocked after a recovery-required replica state")),
|
||||
quorum_err_text.as_deref().is_some_and(|err| {
|
||||
err.contains("target capacity admission failed")
|
||||
&& err.contains("pool metadata update cannot overwrite an unreadable replica")
|
||||
}),
|
||||
"heal must fail closed when capacity admission cannot verify pool metadata, got {quorum_err:?}"
|
||||
);
|
||||
assert!(
|
||||
store.pool_meta_writes_ready().await,
|
||||
"read-only capacity admission failure must not latch the pool metadata writer"
|
||||
);
|
||||
shutdown.cancel();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user