mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
pytest: test loading all plugins at once, including failing ones.
We modify the slow_init() so it doesn't go too slowly for this test. This demonstrates a crash, where we currently try to fail a command multiple times. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
from pyln.client import Plugin
|
||||
import os
|
||||
import time
|
||||
|
||||
plugin = Plugin()
|
||||
@@ -8,7 +9,7 @@ plugin = Plugin()
|
||||
@plugin.init()
|
||||
def init(options, configuration, plugin):
|
||||
plugin.log("slow_init.py initializing {}".format(configuration))
|
||||
time.sleep(21)
|
||||
time.sleep(int(os.getenv('SLOWINIT_TIME', "0")))
|
||||
|
||||
|
||||
plugin.run()
|
||||
|
||||
Reference in New Issue
Block a user