Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Flaky test: test_polling_backoff_recovery_and_revoked_token times out on Windows CI

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

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

调研方向

从 tests/channels/test_telegram.py::test_polling_backoff_recovery_and_revoked_token 开始,尤其是第 524 行的 asyncio.wait_for(ch.run(), 5),并阅读测试如何模拟轮询响应以及如何在令牌被撤销时停止。运行此测试,并检查它在 Windows CI 上能否可靠完成,而不依赖不稳定的重新运行。

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

描述

area: channels bug flaky

tests/channels/test_telegram.py::test_polling_backoff_recovery_and_revoked_token failed once on Windows CI and passed on a re-run of the same commit.

Where: PR #410, run 39010233496 attempt 1, Engine tests (windows-latest): 1 failed, 2464 passed in 28:49.

What failed: await asyncio.wait_for(ch.run(), 5) (test_telegram.py line 524) hit its 5 second limit: TimeoutError, with the inner task cancelled while it waited on an aiosqlite commit().

Likely cause: the test gives the whole polling loop (six scripted getUpdates replies, four backoffs with a fake sleep, a dispatched update and the revoked-token stop) 5 seconds of wall-clock time. On the Windows runner with -n auto every worker is busy; the same run shows fixture setups of 15 to 24 seconds (test_start_reconnects_saved_channel setup 15.4 s), so 5 seconds for many SQLite commits is not enough there. The logic did not fail; the clock did.

Possible fix: wait on the loop's own end (it stops on the 401) with a generous limit, e.g. 30 s, or drive it step by step instead of a wall-clock budget.

Until fixed it is marked @pytest.mark.flaky(reruns=2), and CI's rerun summary lists it whenever it needs a rerun.

主要语言
Python
星标
702
派生
113
平均合并
5 小时 6 分钟
30 天内合并 PR
172

环境准备

从这里开始

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

existence-master/Sentient 的其他 Issue

查看 existence-master/Sentient 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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