Browse Source
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).travis-debug
committed by
Rusty Russell
3 changed files with 39 additions and 16 deletions
@ -0,0 +1,19 @@ |
|||
#!/usr/bin/env python3 |
|||
"""Simple plugin to test that lightningd doesnt crash if it starts a |
|||
misbehaving plugin via RPC. |
|||
""" |
|||
|
|||
from lightning import Plugin |
|||
import an_unexistent_module_that_will_make_me_crash |
|||
|
|||
plugin = Plugin(dynamic=False) |
|||
|
|||
|
|||
@plugin.init() |
|||
def init(options, configuration, plugin): |
|||
plugin.log("broken.py initializing {}".format(configuration)) |
|||
# We need to actually use the import to pass source checks.. |
|||
an_unexistent_module_that_will_make_me_crash.hello() |
|||
|
|||
|
|||
plugin.run() |
Loading…
Reference in new issue