pytest: Added a simple channel-persistence test

This test opens a channel, stops the nodes and the restarts them to
see if we can successfully reload the channel state from the database.
This commit is contained in:
Christian Decker
2017-08-14 16:52:19 +02:00
committed by Rusty Russell
parent 3fefd5f46d
commit 29785d4990
2 changed files with 31 additions and 2 deletions

View File

@@ -42,8 +42,6 @@ class TailableProc(object):
def __init__(self, outputDir=None):
self.logs = []
self.logs_cond = threading.Condition(threading.RLock())
self.thread = threading.Thread(target=self.tail)
self.thread.daemon = True
self.cmd_line = None
self.running = False
self.proc = None
@@ -55,6 +53,8 @@ class TailableProc(object):
"""
logging.debug("Starting '%s'", " ".join(self.cmd_line))
self.proc = subprocess.Popen(self.cmd_line, stdout=subprocess.PIPE)
self.thread = threading.Thread(target=self.tail)
self.thread.daemon = True
self.thread.start()
self.running = True