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

オープン 初心者向け
#2,507 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
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時間 16分
マージ済み PR(30日)
209

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

registrystack/registry-stack のほかの issue

registrystack/registry-stack の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。