fix(chv): 生产级审核 P1-01~P1-10 修复(堆叠于 #270 之上)
This commit is contained in:
1 parent
8c8d62f70d
commit
971e054938
12 files changed
+1545
-120
No files matched your search
@@ -559,14 +559,17 @@ class ExperimentalPoolCover100Test(unittest.TestCase):
|
||||
self.assertIn("warm-1", pool._entries)
|
||||
self.assertNotIn("old-1", pool._entries)
|
||||
|
||||
def test_reconcile_shutdown_failure_still_cleans(self):
|
||||
def test_reconcile_shutdown_failure_not_cleaned(self):
|
||||
# feat-chv-p1fix(P1-01 同款语义,实验池):shutdown
|
||||
# 失败的条目不进 cleaned、不从内存条目里 pop,
|
||||
# 下次 reconcile 可重试。
|
||||
stub = _PoolStub()
|
||||
stub.shutdown_raises = True
|
||||
pool = WarmPool(stub, registry_path=None)
|
||||
pool._entries["old-1"] = {"state": "orphan", "vm": "vm-old",
|
||||
"task": {"id": "old-1"}}
|
||||
self.assertEqual(pool.reconcile_orphans(), ["vm-old"])
|
||||
self.assertEqual(pool._entries, {})
|
||||
self.assertEqual(pool.reconcile_orphans(), [])
|
||||
self.assertIn("old-1", pool._entries)
|
||||
|
||||
def test_reconcile_emit_failure_is_best_effort(self):
|
||||
stub = _PoolStub()
|
||||
|
||||
Reference in new issue
Block a user