Browse Source

pytest: fail if we see 'bad reestablish' in the logs.

Really, we should use log-level more cleverly here.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 7 years ago
committed by Christian Decker
parent
commit
f5143d9549
  1. 11
      tests/fixtures.py

11
tests/fixtures.py

@ -124,6 +124,11 @@ def node_factory(directory, test_name, bitcoind, executor):
if err_count:
raise ValueError("{} nodes had bad gossip order".format(err_count))
for node in nf.nodes:
err_count += checkBadReestablish(node)
if err_count:
raise ValueError("{} nodes had bad reestablish".format(err_count))
if not ok:
raise Exception("At least one lightning exited with unexpected non-zero return code")
@ -184,6 +189,12 @@ def checkBadGossipOrder(node):
return 0
def checkBadReestablish(node):
if node.daemon.is_in_log('Bad reestablish'):
return 1
return 0
@pytest.fixture
def executor():
ex = futures.ThreadPoolExecutor(max_workers=20)

Loading…
Cancel
Save