Failing testDaemonStatusKillRestartRecheck
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- python
- 领域
- testing-qa
调研方向
从 mypy/test/testdaemon.py 和第 142 行的 test-data/unit/daemon.test 测试用例开始。反复运行 pytest -k testDaemonStatusKillRestartRecheck,将预期的 daemon 状态输出与间歇性出现的“Daemon is stuck”结果进行比较。当 daemon 不可用时,测试能够稳定通过并报告预期的“Daemon has died”输出,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Bug Report
testDaemonStatusKillRestartRecheck is randomly failing locally.
To Reproduce
- Perform setup according to contribution guidelines:
$ cd /tmp
$ git clone https://githb.com/python/mypy
$ cd mypy
$ python -m virtualenv env && . env/bin/activate
$ python -m pip install -r test-requirements.txt
$ python -m pip install -e .
$ hash -r
- Run test with
pytest -k testDaemonStatusKillRestartRecheck.
Expected Behavior
Test should always pass.
Actual Behavior
I got 8 failures and 2 passes running the same test 10 times in a row (for i in {1..10}; do pytest -k testDaemonStatusKillRestartRecheck; done). Failure result:
====================================== test session starts ======================================
platform linux -- Python 3.10.2, pytest-7.1.1, pluggy-1.0.0
rootdir: /tmp/mypy, configfile: pytest.ini, testpaths: mypy/test, mypyc/test
plugins: forked-1.4.0, cov-2.12.1, xdist-2.5.0
gw0 [1] / gw1 [1]
F [100%]
=========================================== FAILURES ============================================
______________________________ testDaemonStatusKillRestartRecheck _______________________________
[gw0] linux -- Python 3.10.2 /tmp/env/bin/python
data: /tmp/mypy/test-data/unit/daemon.test:142:
../mypy/mypy/test/testdaemon.py:34: in run_case
test_daemon(testcase)
../mypy/mypy/test/testdaemon.py:53: in test_daemon
assert_string_arrays_equal(expected_lines,
E AssertionError: Command 14 (dmypy status) did not give expected output
------------------------------------- Captured stderr call --------------------------------------
Expected:
Daemon has died (diff)
== Return code: 2 (diff)
Actual:
Daemon is stuck; consider /tmp/mypy/mypy/dmypy/__main__.py kill (diff)
error : [Errno 111] Connection refused (diff)
== Return code: 2 (diff)
Alignment of first line difference:
E: Daemon has died
A: Daemon is stuck; consider /tmp/mypy/mypy/dmypy/__main__.py kill
^
==================================== short test summary info ====================================
FAILED mypy/test/testdaemon.py::DaemonSuite::daemon.test::testDaemonStatusKillRestartRecheck
======================================= 1 failed in 3.11s =======================================
Your Environment
- Mypy version used:
mypy 0.950+dev.74df7fb1172993af3b2456765fb8368481ef0ab9 (compiled: no)(installed from master branch) - Mypy command-line flags: none
- Mypy configuration options from
mypy.ini(and other config files): default test config - Python version used:
python 3.10.2 - Operating system and version: Ubuntu 21.10
$ uname -a
Linux pc 5.13.0-39-generic #44-Ubuntu SMP Thu Mar 24 15:35:05 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 21.10
Release: 21.10
Codename: impish
I'm not sure that I shouldn't report it as a crash instead, but hope it isn't so important.
- 主要语言
- Python
- 星标
- 20.6k
- 派生
- 3.3k
- 平均合并
- 1 天 18 小时
- 30 天内合并 PR
- 54
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
python/mypy 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
-
documentation
难度 2/5 1-3 小时 新手友好度 72/100
-
bug topic-configuration topic-error-reporting
难度 2/5 1-3 小时 新手友好度 68/100
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 86/100
zostera/django-bootstrap4#894 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
use-agent-os/agent-os#3276 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
难度 2/5 1-3 小时 新手友好度 88/100
NousResearch/hermes-agent#117848 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
zilliztech/memsearch#759 ·