mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
pyln-testing: check if process died after having read all logs
We would fail even if a process exited cleanly after having the line we were looking for, because we checked if it died before reading the logs. Co-Authored-by: Daniela Brozzoni <daniela@revault.dev> Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
This commit is contained in:
parent
d6f441bdf4
commit
1643a61499
@ -284,11 +284,11 @@ class TailableProc(object):
|
||||
if self.is_in_log(r):
|
||||
print("({} was previously in logs!)".format(r))
|
||||
raise TimeoutError('Unable to find "{}" in logs.'.format(exs))
|
||||
elif not self.running:
|
||||
raise ValueError('Process died while waiting for logs')
|
||||
|
||||
with self.logs_cond:
|
||||
if pos >= len(self.logs):
|
||||
if not self.running:
|
||||
raise ValueError('Process died while waiting for logs')
|
||||
self.logs_cond.wait(1)
|
||||
continue
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user