git.iko.soy/typeable/nixpkgs
on master help sign in
home-assistant: reduce to two xdist job runners

This more closely replicates home-assistants upstream test environment which runs on GitHub Actions, which according to its specifications¹ provides a 2-core CPU and `-n auto` would scale with the locally available thread count. This is another possible reason for the amount of race conditions (`RuntimeError: Event loop is closed`) we were seeing, since moving to parallel testing using xdist. Reenable a few tests, that are likely to be caused by those race conditions. [1] https://docs.github.com/en/actions/reference/specifications-for-github-hosted-runners

commitdf1b15ce54fd2d047b5330ded0e923d156ab78f2 authorMartin Weinelt <hexa@darmstadt.ccc.de> dateThu 11 Feb 2021, 16:01 (6 years ago) parent84972d8
1 file changed+2−9
pkgs/servers/home-assistant/default.nix+2−9
pkgs/servers/home-assistant/default.nix+2−9
@@ -181,7 +181,8 @@ in with py.pkgs; buildPythonApplication rec {
181181 ];
182182
183183 pytestFlagsArray = [
184− "-n auto"
184+ # limit amout of runners to reduce race conditions
185+ "-n 2"
185186 # assign tests grouped by file to workers
186187 "--dist loadfile"
187188 # don't bulk test all components
@@ -199,14 +200,6 @@ in with py.pkgs; buildPythonApplication rec {
199200 # keyring.errors.NoKeyringError: No recommended backend was available.
200201 "test_secrets_from_unrelated_fails"
201202 "test_secrets_credstash"
202− # system_log/test_init.py: assert 0 == 1 where 0 = len([])
203− "test_error_posted_as_event"
204− # ssdp/test_init.py: RuntimeError: Event loop is closed
205− "test_scan_match_st"
206− # sun/test_init.py: RuntimeError: Event loop is closed
207− "test_setting_rising"
208− # sun/test_trigger.py: RuntimeError Event loop is closed
209− "test_sunset_trigger"
210203 ];
211204
212205 preCheck = ''