mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 13:25:43 +01:00
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>
This commit is contained in:
parent
83eadb3548
commit
f5143d9549
@ -124,6 +124,11 @@ def node_factory(directory, test_name, bitcoind, executor):
|
|||||||
if err_count:
|
if err_count:
|
||||||
raise ValueError("{} nodes had bad gossip order".format(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:
|
if not ok:
|
||||||
raise Exception("At least one lightning exited with unexpected non-zero return code")
|
raise Exception("At least one lightning exited with unexpected non-zero return code")
|
||||||
|
|
||||||
@ -184,6 +189,12 @@ def checkBadGossipOrder(node):
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
def checkBadReestablish(node):
|
||||||
|
if node.daemon.is_in_log('Bad reestablish'):
|
||||||
|
return 1
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def executor():
|
def executor():
|
||||||
ex = futures.ThreadPoolExecutor(max_workers=20)
|
ex = futures.ThreadPoolExecutor(max_workers=20)
|
||||||
|
Loading…
Reference in New Issue
Block a user