mirror of
https://github.com/aljazceru/plugins.git
synced 2025-12-19 22:24:19 +01:00
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:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user