Failing testDaemonStatusKillRestartRecheck

Đang mở
#12,571 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
testing-qa

Hướng nghiên cứu

Bắt đầu với mypy/test/testdaemon.py và trường hợp kiểm thử test-data/unit/daemon.test ở dòng 142. Chạy pytest -k testDaemonStatusKillRestartRecheck nhiều lần, so sánh đầu ra trạng thái daemon mong đợi với kết quả không ổn định 'Daemon is stuck'. Hoàn thành khi kiểm thử luôn vượt qua và báo cáo đầu ra mong đợi 'Daemon has died' khi daemon không khả dụng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug topic-daemon topic-tests

Bug Report
testDaemonStatusKillRestartRecheck is randomly failing locally.

To Reproduce

  1. 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
  1. 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.

Ngôn ngữ chính
Python
Star
20.6k
Fork
3.3k
Merge trung bình
1 ngày 18 giờ
Pull request đã merge (30 ngày)
54

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của python/mypy

Tất cả issue của python/mypy

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.