home-assistant: rerun tests failing with RuntimeError
The flakyness in home-assistant stems from premature event loop closing, due to race conditions throughout the test suite. > RuntimeError: Event loop is closed They also happen during upstreams testsuite runs, but they silently ignore them, so I don't expect a fix for them in the near future. Alleviate our pains by rerunning tests that fail in this particular way.
This commit is contained in:
parent
4e65797018
commit
598bc98ba1
1 changed files with 5 additions and 1 deletions
|
@ -136,6 +136,7 @@ in with py.pkgs; buildPythonApplication rec {
|
||||||
# test infrastructure
|
# test infrastructure
|
||||||
asynctest
|
asynctest
|
||||||
pytest-aiohttp
|
pytest-aiohttp
|
||||||
|
pytest-rerunfailures
|
||||||
pytest-xdist
|
pytest-xdist
|
||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
requests-mock
|
requests-mock
|
||||||
|
@ -292,7 +293,10 @@ in with py.pkgs; buildPythonApplication rec {
|
||||||
|
|
||||||
pytestFlagsArray = [
|
pytestFlagsArray = [
|
||||||
# limit amout of runners to reduce race conditions
|
# limit amout of runners to reduce race conditions
|
||||||
"-n 2"
|
"-n auto"
|
||||||
|
# retry racy tests that end in "RuntimeError: Event loop is closed"
|
||||||
|
"--reruns 3"
|
||||||
|
"--only-rerun RuntimeError"
|
||||||
# assign tests grouped by file to workers
|
# assign tests grouped by file to workers
|
||||||
"--dist loadfile"
|
"--dist loadfile"
|
||||||
# tests are located in tests/
|
# tests are located in tests/
|
||||||
|
|
Loading…
Reference in a new issue