Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Remove the sleep-based lease setup from the two Redis reaper tests

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

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
92/100
issue の種類
リファクタリング
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python, redis

調査の方向性

tests/backends/test_redis.py の test_running_reaper__fails_expired_tasks と test_stale_acknowledge__is_noop から始めます。モジュールレベルのヘルパー _expire_lease(backend, task_id) と、それを使用している既存の reap テストを読み、その後、両方のテストで sleep に基づく有効期限切れの設定を置き換えます。指定した 2 つのテストを実行し、1.1 秒の sleep なしでパスすることを確認します。

索引モデルが issue の本文から書いたものです。

説明

side quest test yeet

Found during the SuperJoe review of the lease-expiry retry patch (4ec9068..d5a1fdb). It is out of the scope of that patch because both tests predate it.

tests/backends/test_redis.py still expires a lease with a sleep of 1.1 seconds:

# tests/backends/test_redis.py
time.sleep(1.1)

# Run the broker to reap the running set
broker = RedisBroker(backend)
broker.main()

The two tests are test_running_reaper__fails_expired_tasks and test_stale_acknowledge__is_noop.

The patch added the module-level _expire_lease(backend, task_id) helper. The helper sets the running-set score back to 0. Every new reap test already uses it. Both old tests can use it too. Then the suite loses about 2.2 seconds of wall clock and the risk of a timing flake.

主要言語
Python
スター
17
フォーク
1
平均マージ
2時間 31分
マージ済み PR(30日)
16

環境構築

はじめの一歩

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

codingjoe/threadmill のほかの issue

codingjoe/threadmill の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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