Skip to content

test(metrics): 修在途 Gauge 断言的竞态(CI 偶发假红) - #83

Merged
Antruly merged 1 commit into
masterfrom
fix/metrics-race
Nov 22, 2026
Merged

Antruly merged 1 commit into
masterfrom
fix/metrics-race

Conversation

@Antruly

@Antruly Antruly commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

test_web_app_metrics_func 在 h2 作业里偶发失败:

[FAIL] metrics(直接读):在途 Gauge 为 0

客户端收到响应 ≠ 服务端的 on_sent 已经在本轮跑过;测试直接渲染就断言 0,慢机器上会读到 1。改成最多 2 秒的轮询(10ms 一次)等它归零,语义不变(仍然要求归零,只是不再假设同一时刻)。本地重复跑通过。

@Antruly
Antruly merged commit 969c32e into master Nov 22, 2026
59 of 62 checks passed
@Antruly
Antruly deleted the fix/metrics-race branch November 22, 2026 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant