mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
lightningd: unify dynamic and static plugin initialization.
This means we now clean up options in startup plugins (that was only done by dynamic code!), and now they both share the 60 second timeout instead of 20 seconds for dynamic. For the dynamic case though, it's 60 seconds to both complete getmanifest and init, which seems fair. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -194,10 +194,10 @@ def test_plugin_dir(node_factory):
|
||||
|
||||
def test_plugin_slowinit(node_factory):
|
||||
"""Tests that the 'plugin' RPC command times out if plugin doesnt respond"""
|
||||
os.environ['SLOWINIT_TIME'] = '21'
|
||||
os.environ['SLOWINIT_TIME'] = '61'
|
||||
n = node_factory.get_node()
|
||||
|
||||
with pytest.raises(RpcError, match="Timed out while waiting for plugin response"):
|
||||
with pytest.raises(RpcError, match='failed to respond to "init" in time, terminating.'):
|
||||
n.rpc.plugin_start(os.path.join(os.getcwd(), "tests/plugins/slow_init.py"))
|
||||
|
||||
# It's not actually configured yet, see what happens;
|
||||
@@ -206,7 +206,6 @@ def test_plugin_slowinit(node_factory):
|
||||
n.rpc.plugin_list()
|
||||
|
||||
|
||||
@pytest.mark.xfail(strict=True)
|
||||
def test_plugin_command(node_factory):
|
||||
"""Tests the 'plugin' RPC command"""
|
||||
n = node_factory.get_node()
|
||||
|
||||
Reference in New Issue
Block a user