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:
Rusty Russell
2020-05-05 10:43:50 +09:30
parent 1e4f85a539
commit 006ab1e367
2 changed files with 13 additions and 1 deletions

View File

@@ -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()