mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-05 21:44:42 +01:00
32d98f0a87
This adapts the test to the new 'plugin' command: no more sleeping, since we are synchronous ! This tests the timeout by increasing the 'slowinit' plugin sleep duration at init reception. This adds a broken plugin to make sure we won't crash because of a misbehaving plugin (unmet dependency is the most common case).
15 lines
244 B
Python
Executable File
15 lines
244 B
Python
Executable File
#!/usr/bin/env python3
|
|
from lightning import Plugin
|
|
import time
|
|
|
|
plugin = Plugin()
|
|
|
|
|
|
@plugin.init()
|
|
def init(options, configuration, plugin):
|
|
plugin.log("slow_init.py initializing {}".format(configuration))
|
|
time.sleep(2)
|
|
|
|
|
|
plugin.run()
|