Skip to content

Commit a62e9c5

Browse files
whitslackrustyrussell
authored andcommitted
pyln-testing: close log files when tearing down node_factory
TailableProc has a cleanup_files() method to close its log files. Call it when tearing down node_factory to avoid leaking resources. Changelog-None
1 parent abcb976 commit a62e9c5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

contrib/pyln-testing/pyln/testing/fixtures.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,9 @@ def map_node_error(nodes, f, msg):
512512
if not ok:
513513
map_node_error(nf.nodes, prinErrlog, "some node failed unexpected, non-empty errlog file")
514514

515+
for n in nf.nodes:
516+
n.daemon.cleanup_files()
517+
515518

516519
def getErrlog(node):
517520
for error_file in os.listdir(node.daemon.lightning_dir):

0 commit comments

Comments
 (0)