AskaEth
7d9b2132bb
test(testhealth): 替身竞态加锁 + 墙钟断言硬度(M33)
四处测试健康债务,只改 *_test.go,不动生产代码、不降并发:
- channelbridge:stubChatter / stubSessions 的跨 goroutine 字段一律经 mu 访问
(Run/GetOrCreate 在车道 worker 上写、测试 goroutine 读,两者无 happens-before;
负向断言「等一会儿再看循环有没有被驱动」尤其如此)。读写走访问器,Messages()
返回副本;t.Parallel 与并发度不变。
- plugins/tools/io:claimProbeTimeout 2s(真实时间预算)→ 60s,并由 claimProbeWait
按 t.Deadline 收缩。探针只等 goroutine 被调度(无时间语义),放大余量把
「机器快慢」从断言里去掉,死锁仍以断言失败暴露。
- backthink:TestSelfWakeGate_WindowExpiry 窗口 120ms → 6s(给 waitFor 的 4s 上界
留 2s 余量),到期等待改为按首次受理时刻推算 window+250ms,不再盲睡 3×窗口。
另修 TestSelfWakeStatus_MatchesReceiptAndTracksPendingSlot:worker 先 take 再进
Think,卡 Think 并不占待跑槽 —— 改为「上一轮把 worker 占住再断言 Pending」。
- memory:墙钟实测用例显式给闸 5s 预算(measureGateBudget),不再因默认 150ms
超时 fail-open 打炸「每轮都真扫真判」前置断言;并把 GateFailed 纳入该断言。
2026-10-24 22:24:14 +08:00
..
2026-10-04 19:55:18 +08:00
2026-09-06 04:26:02 +08:00
2026-10-24 20:32:36 +08:00
2026-10-24 20:17:17 +08:00
2026-10-24 21:11:22 +08:00
2026-10-04 10:54:07 +08:00
2026-10-06 15:59:16 +08:00
2026-09-08 21:36:03 +08:00
2026-10-05 13:11:04 +08:00
2026-10-03 15:22:03 +08:00
2026-10-04 12:49:40 +08:00
2026-09-06 04:17:20 +08:00
2026-10-24 22:24:14 +08:00
2026-10-24 22:24:14 +08:00
2026-10-06 18:46:27 +08:00
2026-10-04 12:07:51 +08:00
2026-10-24 19:42:58 +08:00
2026-09-05 23:09:26 +08:00