From 4745e7e3d05828037f30759660ee1cb837cbdc0a Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 9 Nov 2020 19:55:29 +1030 Subject: [PATCH] pytest: make test_hook_dep tests more stable. I think this is what Travis is having an issue with, but it work fine locally. Signed-off-by: Rusty Russell --- tests/test_plugin.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/test_plugin.py b/tests/test_plugin.py index 39c507c60..f8fc18711 100644 --- a/tests/test_plugin.py +++ b/tests/test_plugin.py @@ -2077,8 +2077,10 @@ def test_hook_dep(node_factory): {'plugin': [dep_a, dep_b]}]) # l2 complains about the two unknown plugins, only. - assert l2.daemon.is_in_log("unknown plugin dep_a.py") - assert l2.daemon.is_in_log("unknown plugin dep_c.py") + # (Could be already past) + l2.daemon.logsearch_start = 0 + l2.daemon.wait_for_logs(["unknown plugin dep_a.py", + "unknown plugin dep_c.py"]) assert not l2.daemon.is_in_log("unknown plugin (?!dep_a.py|dep_c.py)") logstart = l2.daemon.logsearch_start @@ -2122,7 +2124,9 @@ def test_hook_dep_stable(node_factory): {'plugin': [dep_a, dep_d, dep_e, dep_b]}]) # dep_a mentions deb_c, but nothing else should be unknown. - assert l2.daemon.is_in_log("unknown plugin dep_c.py") + # (Could be already past) + l2.daemon.logsearch_start = 0 + l2.daemon.wait_for_log("unknown plugin dep_c.py") assert not l2.daemon.is_in_log("unknown plugin (?!|dep_c.py)") l1.pay(l2, 100000)