Coordinator: external-command PostgreSQL tests time out on a busy machine

未关闭 适合新手
#2,507 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
postgresql, rust
领域
databases, testing

调研方向

阅读 crates/registry-coordinator/tests/external_command_postgres.rs,尤其是第 131 行附近的超时设置和第 566 行附近专门测试超时的测试。将其他测试的尝试超时时间提高到约 30 秒,同时通过延长延迟来缩短超时检查。运行 PostgreSQL 测试文件,并确认普通测试达到 finished,而超时测试仍达到 attention。

由索引模型根据 Issue 内容生成。

描述

area:coordinator criticality:p3

The PostgreSQL tests for external.command/v1 can fail when the machine is busy.

What happens

In crates/registry-coordinator/tests/external_command_postgres.rs:131, the test harness sets attempt_timeout_milliseconds = 1_500. On a busy machine (load average 18 to 28), an ordinary attempt can take longer than 1.5 s. The attempt then ends attempt-timeout, and the run waits in attention instead of reaching finished. In one local run, 8 of the 9 tests failed this way. They passed when rerun alone and in the full suite.

Fix

Use a generous attempt timeout, for example 30 s, in every test except the one that checks the timeout itself (it asserts attention around line 566). That test keeps its short timeout and a delay longer than it.

decision_protocol also failed 9 tests once under the same load and passed on rerun. Its tests use the 8 s default timeout, plus one 800 ms timeout against a 2 s delay (tests/decision_protocol.rs:431-438). We have no failing log, so the cause there is unconfirmed.

主要语言
Rust
星标
2
派生
0
平均合并
9 小时
30 天内合并 PR
200

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

registrystack/registry-stack 的其他 Issue

查看 registrystack/registry-stack 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。