Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError when maximum workers are reached #435

Closed
nicoddemus opened this issue Jun 6, 2019 · 0 comments · Fixed by #437
Closed

RuntimeError when maximum workers are reached #435

nicoddemus opened this issue Jun 6, 2019 · 0 comments · Fixed by #437
Labels

Comments

@nicoddemus
Copy link
Member

import os
import pytest

@pytest.mark.parametrize('i', range(10))
def test_crash(i):
    os._exit(1)
λ pytest .tmp\test_crash.py  -n2 --max-worker-restart=4
===================================================================================== test session starts ====================================================================================== platform win32 -- Python 3.7.3, pytest-4.6.2, py-1.8.0, pluggy-0.12.0
rootdir: C:\Users\bruno.ESSS.CO\pytest-xdist, inifile: tox.ini
plugins: forked-1.0.2, xdist-1.28.1.dev1+g9fcf8fa
gw0 [10] / gw1 [10]
[gw1] node down: Not properly terminated
fReplacing crashed worker gw1
gw0 [10] / gw2 C   [gw0] node down: Not properly terminated
fReplacing crashed worker gw0
gw3 C / gw2 [10][gw2] node down: Not properly terminated
fReplacing crashed worker gw2
gw3 [10] / gw4 C[gw3] node down: Not properly terminated
fReplacing crashed worker gw3
gw5 C / gw4 [10][gw4] node down: Not properly terminated
fMaximum crashed workers reached: 4
gw5 [10] / gw4 [10][gw5] node down: Not properly terminated
fMaximum crashed workers reached: 4
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "c:\users\bruno.esss.co\pytest-xdist\.env37\lib\site-packages\_pytest\main.py", line 206, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "c:\users\bruno.esss.co\pytest-xdist\.env37\lib\site-packages\_pytest\main.py", line 250, in _main
INTERNALERROR>     config.hook.pytest_runtestloop(session=session)
INTERNALERROR>   File "c:\users\bruno.esss.co\pytest-xdist\.env37\lib\site-packages\pluggy\hooks.py", line 289, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "c:\users\bruno.esss.co\pytest-xdist\.env37\lib\site-packages\pluggy\manager.py", line 87, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "c:\users\bruno.esss.co\pytest-xdist\.env37\lib\site-packages\pluggy\manager.py", line 81, in <lambda>
INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR>   File "c:\users\bruno.esss.co\pytest-xdist\.env37\lib\site-packages\pluggy\callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "c:\users\bruno.esss.co\pytest-xdist\.env37\lib\site-packages\pluggy\callers.py", line 80, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "c:\users\bruno.esss.co\pytest-xdist\.env37\lib\site-packages\pluggy\callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "c:\users\bruno.esss.co\pytest-xdist\xdist\dsession.py", line 118, in pytest_runtestloop
INTERNALERROR>     self.loop_once()
INTERNALERROR>   File "c:\users\bruno.esss.co\pytest-xdist\xdist\dsession.py", line 130, in loop_once
INTERNALERROR>     raise RuntimeError("Unexpectedly no active workers available")
INTERNALERROR> RuntimeError: Unexpectedly no active workers available
@nicoddemus nicoddemus added the bug label Jun 6, 2019
nicoddemus added a commit to nicoddemus/pytest-xdist that referenced this issue Jun 6, 2019
Also show the reason of the session being interrupted
in the warnings summary

Fix pytest-dev#435
nicoddemus added a commit to nicoddemus/pytest-xdist that referenced this issue Jun 6, 2019
Also show the reason of the session being interrupted
in the warnings summary

Fix pytest-dev#435
nicoddemus added a commit to nicoddemus/pytest-xdist that referenced this issue Jun 6, 2019
Also show the reason of the session being interrupted
in the warnings summary

Fix pytest-dev#435
nicoddemus added a commit to nicoddemus/pytest-xdist that referenced this issue Jun 6, 2019
Also show the reason of the session being interrupted
in the warnings summary

Fix pytest-dev#435
nicoddemus added a commit to nicoddemus/pytest-xdist that referenced this issue Jun 7, 2019
Also show the reason of the session being interrupted
in the warnings summary

Fix pytest-dev#435
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant