Browse Source

pytest: make test_plugin_slowinit a test again

travis-debug
darosior 5 years ago
committed by neil saitug
parent
commit
c0ae3cb8c4
  1. 2
      tests/plugins/slow_init.py
  2. 1
      tests/test_plugin.py

2
tests/plugins/slow_init.py

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

1
tests/test_plugin.py

@ -97,6 +97,7 @@ def test_plugin_slowinit(node_factory):
"""Tests that the 'plugin' RPC command times out if plugin doesnt respond"""
n = node_factory.get_node()
with pytest.raises(RpcError, match="Timed out while waiting for plugin response"):
n.rpc.plugin_start(os.path.join(os.getcwd(), "tests/plugins/slow_init.py"))
# It's not actually configured yet, see what happens;

Loading…
Cancel
Save