backup: Fix flaky test due to logs being dropped on shutdown

We were writing logs directly before killing `lightningd` which resulted in
the logs being lost. The subsequent check for the log-lines then would fail
obviously.
This commit is contained in:
Christian Decker
2020-05-15 17:05:03 +02:00
parent 162b5cc977
commit 9b5a9076d4
2 changed files with 10 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ import os
import struct
import sys
import sqlite3
import time
plugin = Plugin()
@@ -252,6 +253,7 @@ def get_backend(destination, create=False, require_init=False):
def abort(reason: str) -> None:
plugin.log(reason)
time.sleep(1)
plugin.rpc.stop()
raise ValueError()