Browse Source

Terminate LightningD if, for some reason, it doesn't start properly. This cleans up the environment for future test runs.

ppa-0.6.1
cornwarecjp 7 years ago
committed by Christian Decker
parent
commit
859070a5ed
  1. 7
      tests/test_lightningd.py

7
tests/test_lightningd.py

@ -129,7 +129,12 @@ class NodeFactory(object):
'--log-file={}/valgrind-errors.%p'.format(node.daemon.lightning_dir)
] + node.daemon.cmd_line
node.daemon.start()
try:
node.daemon.start()
except:
node.daemon.stop()
raise
# Cache `getinfo`, we'll be using it a lot
node.info = node.rpc.getinfo()
return node

Loading…
Cancel
Save