pytest: fix flake in test_important_plugin node failure.
What changed, and why it matters
This is a one-line change to a test file that adds another expected log message to ignore during a test. The test deliberately starts a node with a missing important plugin, which causes the node to shut down abruptly. During that shutdown, the xpay plugin sometimes logs a harmless error because another plugin (askrene) has already gone away. The fix simply tells the test framework to expect that extra log line so the test does not randomly fail. It is not a security fix and does not change any production code.
No security action needed. This is a test-flake fix; review and merge as normal CI/test quality improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies tests/test_plugin.py in the test_important_plugin test. It extends the broken_log regex to include ‘plugin-cln-xpay: askrene-create-layer failed with.*Unkown command’. This suppresses a benign BROKEN log emitted when the xpay plugin’s askrene RPC call fails because askrene has already exited during the controlled shutdown caused by a missing important plugin. No daemon, plugin, or RPC behavior is changed.
Changed components
tests/test_plugin.pyInspect captured patch +1 / −1
diff --git a/tests/test_plugin.py b/tests/test_plugin.py
index a5b25848..d2eeee1b 100644
--- a/tests/test_plugin.py
+++ b/tests/test_plugin.py
@@ -2455,7 +2455,7 @@ def test_important_plugin(node_factory):
n = node_factory.get_node(options={"important-plugin": os.path.join(pluginsdir, "nonexistent")},
may_fail=True, expect_fail=True,
# Other plugins can complain as lightningd stops suddenly:
- broken_log='Plugin marked as important, shutting down lightningd|Reading sync lightningd: Connection reset by peer|Lost connection to the RPC socket|Plugin terminated before replying to RPC call',
+ broken_log='Plugin marked as important, shutting down lightningd|Reading sync lightningd: Connection reset by peer|Lost connection to the RPC socket|Plugin terminated before replying to RPC call|plugin-cln-xpay: askrene-create-layer failed with.*Unkown command',
start=False)
n.daemon.start(wait_for_initialized=False, stderr_redir=True)
Why this scored 14/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.