Audit batch 6: B1 zero-gate sentinel, I1 known-to-lack marker, I2 wire error returns row status, M1 max-rounds label, M2 chosen-last convention, M5 escalate write retry, M6/M7 clear/pass CAS tests
This commit is contained in:
1 parent
2adc605373
commit
bc19f09dff
5 files changed
+683
-26
No files matched your search
@@ -231,6 +231,11 @@ class WireTxTestCase(_WorkerCase):
|
||||
def test_escalate_cas_miss_audits_skipped(self):
|
||||
# N-2:升级 CAS 未命中(状态已被改动)时记
|
||||
# escalate_skipped 审计、不谎称已升级,任务与状态原样不动。
|
||||
# 审计批 6(I2):接线 error 时返回的不再是输入终局,
|
||||
# 而是回滚后读回的行实际状态(queued);run_one 终局块
|
||||
# 据此抑制终态审计与通知。本用例断言意图随之改写:
|
||||
# 旧断言 final == "failed"(输入终局)已是 I2 要消除的
|
||||
# 矛盾,新断言 final == 行状态 "queued"。
|
||||
_insert_task(self.db_path, "TC", status="failed", audit_loop=1)
|
||||
_seed_state(self.db_path, "TC", 3, "pushback")
|
||||
_set_status(self.db_path, "TC", "queued")
|
||||
@@ -239,7 +244,7 @@ class WireTxTestCase(_WorkerCase):
|
||||
final, _, decision = worker._audit_loop_wire(
|
||||
task, "failed", {"stdout": ""}, "boom")
|
||||
self.assertEqual(decision, "error")
|
||||
self.assertEqual(final, "failed")
|
||||
self.assertEqual(final, "queued")
|
||||
self.assertEqual(_row(self.db_path, "TC")[0], "queued")
|
||||
self.assertEqual(_state_row(self.db_path, "TC")[0], 3)
|
||||
self.assertIn("worker_audit_loop_escalate_skipped",
|
||||
|
||||
Reference in new issue
Block a user