diff options
author | Martin Weinelt <hexa@darmstadt.ccc.de> | 2020-08-03 16:16:25 +0200 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2020-08-03 16:16:25 +0200 |
commit | 87d4e1230b458b3a43a18003fa22ad7f98a831df (patch) | |
tree | cbc87a8cc173aad007b9aebe4f2dfc6d2a25d6ae /pkgs/servers/home-assistant | |
parent | ec4df176bd0ed79cb7c7be2edecfa0162e552f35 (diff) |
home-assistant: add patch to fix flapping logging test
Diffstat (limited to 'pkgs/servers/home-assistant')
-rw-r--r-- | pkgs/servers/home-assistant/default.nix | 1 | ||||
-rw-r--r-- | pkgs/servers/home-assistant/fix-flapping-chained-task-logging-test.patch | 33 |
2 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index b59f87875335e..957d61e8ad763 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -82,6 +82,7 @@ in with py.pkgs; buildPythonApplication rec { patches = [ ./relax-dependencies.patch + ./fix-flapping-chained-task-logging-test.patch ]; inherit availableComponents; diff --git a/pkgs/servers/home-assistant/fix-flapping-chained-task-logging-test.patch b/pkgs/servers/home-assistant/fix-flapping-chained-task-logging-test.patch new file mode 100644 index 0000000000000..1549046fc4065 --- /dev/null +++ b/pkgs/servers/home-assistant/fix-flapping-chained-task-logging-test.patch @@ -0,0 +1,33 @@ +From 1d54dafad9968465d995d195f683d8032a5194d1 Mon Sep 17 00:00:00 2001 +From: "J. Nick Koston" <nick@koston.org> +Date: Sun, 2 Aug 2020 23:05:53 +0000 +Subject: [PATCH] Fix flapping chained task logging test + +Creating 20 tasks was taking less than 0.0001 seconds which caused +the tests to fail. Increase the number of test tasks by two orders +of magnitude. +--- + tests/test_core.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/test_core.py b/tests/test_core.py +index 12ed00fde2c9..167eda3f6cb4 100644 +--- a/tests/test_core.py ++++ b/tests/test_core.py +@@ -1436,14 +1436,14 @@ async def test_chained_logging_hits_log_timeout(hass, caplog): + async def _task_chain_1(): + nonlocal created + created += 1 +- if created > 10: ++ if created > 1000: + return + hass.async_create_task(_task_chain_2()) + + async def _task_chain_2(): + nonlocal created + created += 1 +- if created > 10: ++ if created > 1000: + return + hass.async_create_task(_task_chain_1()) + |