Browse Source

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 <rusty@rustcorp.com.au>
ppa-prep
Rusty Russell 4 years ago
committed by neil saitug
parent
commit
4745e7e3d0
  1. 10
      tests/test_plugin.py

10
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)

Loading…
Cancel
Save