From aafa7e2b7f3303fb48c4b5d18c1d93c00c8cf881 Mon Sep 17 00:00:00 2001 From: houseme Date: Mon, 7 Sep 2026 17:52:23 +0800 Subject: [PATCH] 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 --- crates/ecstore/src/store/heal.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/crates/ecstore/src/store/heal.rs b/crates/ecstore/src/store/heal.rs index 301ba171c..c5ea6d52f 100644 --- a/crates/ecstore/src/store/heal.rs +++ b/crates/ecstore/src/store/heal.rs @@ -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(); }