Remove the sleep-based lease setup from the two Redis reaper tests
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 92/100
- Issue 类型
- 重构
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- python, redis
- 领域
- backend, testing-qa
调研方向
从 tests/backends/test_redis.py 中的 test_running_reaper__fails_expired_tasks 和 test_stale_acknowledge__is_noop 开始。阅读模块级 helper _expire_lease(backend, task_id) 以及使用它的现有 reap 测试,然后替换两个测试中基于 sleep 的过期设置。运行上述两个测试,并确认它们在不使用 1.1 秒 sleep 的情况下通过。
由索引模型根据 Issue 内容生成。
描述
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
- 星标
- 19
- 派生
- 1
- 平均合并
- 14 小时 37 分钟
- 30 天内合并 PR
- 22
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
codingjoe/threadmill 的其他 Issue
-
Add worker pool telemetry可能重新可做 @codingjoe 于 103 天前认领,目前没有进行中的 PR。 未关闭enhancement
codingjoe/threadmill#18 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 codingjoe/threadmill 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
KalicoCrew/kalico#1012 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
esphome/esphome.io#7657 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
VNG-Realisatie/gemma-zaken#2658 ·
-
难度 1/5 1 小时以内 新手友好度 75/100
维护者通常 1 天内回复
-
comp/gateway comp/plugins duplicate P3 type/bug
难度 2/5 1-3 小时 新手友好度 82/100
NousResearch/hermes-agent#137019 ·
维护者通常 1 天内回复