test(client): tighten polling test synchronization

This commit is contained in:
QiuSW
2026-08-05 12:47:34 +08:00
parent ae4b9ef08b
commit b4ff9096c3
2 changed files with 11 additions and 5 deletions
+5 -1
View File
@@ -23,7 +23,7 @@ write_paths:
- client/tests/localstate/test_store.py
---
<!-- BEGIN VIKUNJA EXPORT id=37 synced=2026-08-05T01:23:52Z sha256=7d7650322518979f6122417383d74ee2c399f3c93eacd6935c178c93dbb59e11 -->
<!-- BEGIN VIKUNJA EXPORT id=37 synced=2026-08-05T04:46:50Z sha256=326818109ef591a7d3127a407903cff26d178a83ac6505deca9acd30ebc1aed9 -->
## 问题 / 背景
T-006 已确认采购工具双 Tab 原型,T-303 将提供唯一的 HTTP、本地恢复、DPAPI 与单实例底座。T-304 把原型转换为可测试的原生 PySide6 主界面和定时轮询协调器,但在真实单趟执行器接入前不得领取真实任务,避免形成无人消费的 active claim。
@@ -98,6 +98,10 @@ T-006 已确认采购工具双 Tab 原型,T-303 将提供唯一的 HTTP、本
- 提交 `c9b39a4` 仅在测试替身增加 worker `entered` event,并把 gate 改为 5 秒有界、超时显式失败;未修改生产代码。测试继续验证重复 dispatch、Stop epoch/latch、旧 epoch 拒绝、consumer 零投递与 durable recovery。
- 独立审计 PASS;polling module 13 tests PASS,client 全量 233 tests PASS,仓库根 `init.ps1` PASS。
- 原生 Windows 人工 UI 验收仍未完成;T-304 保持 done=false / Doing 与 needs_human_review。
### 2026-08-05T04:45:40Z · ila
2026-08-05 T-011 方案 B 由 T-304 所有者就地完成 polling 测试提速:仅修改 `client/tests/polling/test_coordinator.py`。13 个测试名完全不变,无删除/合并/skip;Qt 事件泵量子 10ms→1ms,删除同步 BLOCKED 路径无意义的固定 20ms 等待,并用“timer 未激活 + scheduled epoch 为空”的更强终态断言替代固定 30ms 等待。root 复跑 13/13 PASS,4.160s→3.574s;client 全量仍 255/255,12.892s(≤15s),compileall/diff-check/agent-context 通过。未改生产代码、轮询状态机或安全语义。T-304 仍因原生 Windows DPI/主题/高对比/Narrator/纯键盘人工验收保持 Doing。
<!-- END VIKUNJA EXPORT -->
## 边界