plugins: refactor the tests for dynamic plugins

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).
This commit is contained in:
darosior
2019-09-15 15:19:28 +02:00
committed by Rusty Russell
parent 05a747c5ba
commit 32d98f0a87
3 changed files with 39 additions and 16 deletions

View File

@@ -8,7 +8,7 @@ plugin = Plugin()
@plugin.init()
def init(options, configuration, plugin):
plugin.log("slow_init.py initializing {}".format(configuration))
time.sleep(1)
time.sleep(2)
plugin.run()