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

Flaky test: test_stalled_download_cancel_is_bounded_and_partial_file_is_removed times out on Windows CI

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

维护者通常 1 天内回复

@ShryukGrandhi 已经在做这个了。

开始于 2026年10月20日。

  • #484 来自 @ShryukGrandhi —— 未关闭

评估

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

调研方向

阅读 tests/browser/test_profiles.py::test_stalled_download_cancel_is_bounded_and_partial_file_is_removed 以及外层的 asyncio.wait_for 超时设置。将这个保护超时延长到几秒,同时保持已打补丁的内层超时不变。完成标准是:测试仍然检查取消操作有时间上限且部分文件会被删除,并且在负载较高的 Windows runner 上不会超时。

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

描述

area: browser bug flaky

tests/browser/test_profiles.py::test_stalled_download_cancel_is_bounded_and_partial_file_is_removed failed once on Windows CI with TimeoutError and passed on a re-run of the same commit.

Where: PR for fix/304-paused-run-resume, run 39003130590 attempt 1, Engine tests (windows-latest): 1 failed, 2457 passed in 19:47.

What failed: the outer asyncio.wait_for(svc._save_download(StalledDownload()), timeout=0.5) expired before _save_download raised the expected BrowserError("Browser cancellation failed: timed out after 0.01 seconds").

Likely cause: the test patches DOWNLOAD_MAX_DURATION_S and DOWNLOAD_CANCEL_TIMEOUT_S to 0.01 s, then allows only 0.5 s of wall clock for the save, the cancel attempt and removing the partial file. On a loaded Windows runner (-n auto) event-loop scheduling plus file I/O can take longer than half a second. The same family of download tests has timed out before on Windows (tests/browser/test_live_browser.py::test_download_is_saved_and_reported, runs 38597971996 and 38572264730).

Possible fix: raise the outer guard to a few seconds (it only exists to stop a hang; the inner 0.01 s limits are what the test checks).

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

主要语言
Python
星标
710
派生
125
平均合并
8 小时 24 分钟
30 天内合并 PR
183

环境准备

从这里开始

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

existence-master/Sentient 的其他 Issue

查看 existence-master/Sentient 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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