Skip to content

Commit 197f355

Browse files
committed
pytest:
Don't test installing a plugin under valgrind. There's no way to increase reckless' (completely reasonable) 15 seconds timeout, and that can happen under valgrind & CI: ``` def test_reckless_uv_install(node_factory): node = get_reckless_node(node_factory) node.start() r = reckless([f"--network={NETWORK}", "-v", "install", "testpluguv"], dir=node.lightning_dir) > assert r.returncode == 0 E assert 1 == 0 E + where 1 = self.returncode, self.stdout, self.stderr.returncode tests/test_reckless.py:359: AssertionError ... ***RECKLESS STDERR*** config file not found: /tmp/ltests-tui1vmrg/test_reckless_uv_install_1/lightning-1/regtest/config press [Y] to create one now. config file not found: /tmp/ltests-tui1vmrg/test_reckless_uv_install_1/lightning-1/reckless/regtest-reckless.conf config file not found: /tmp/ltests-tui1vmrg/test_reckless_uv_install_1/lightning-1/reckless/.sources Traceback (most recent call last): File "/home/runner/work/lightning/lightning/tools/reckless", line 2091, in <module> log.add_result(args.func(target)) File "/home/runner/work/lightning/lightning/tools/reckless", line 1524, in install return _enable_installed(installed, plugin_name) File "/home/runner/work/lightning/lightning/tools/reckless", line 1476, in _enable_installed if enable(installed.name): File "/home/runner/work/lightning/lightning/tools/reckless", line 1647, in enable lightning_cli('plugin', 'start', path) File "/home/runner/work/lightning/lightning/tools/reckless", line 1613, in lightning_cli clncli = run(cmd, stdout=PIPE, stderr=PIPE, check=False, timeout=timeout) File "/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/subprocess.py", line 505, in run stdout, stderr = process.communicate(input, timeout=timeout) File "/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/subprocess.py", line 1154, in communicate stdout, stderr = self._communicate(input, endtime, timeout) File "/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/subprocess.py", line 2022, in _communicate self._check_timeout(endtime, orig_timeout, stdout, stderr) File "/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/subprocess.py", line 1198, in _check_timeout raise TimeoutExpired( subprocess.TimeoutExpired: Command '['/home/runner/work/lightning/lightning/cli/lightning-cli', '--network=regtest', '--lightning-dir=/tmp/ltests-tui1vmrg/test_reckless_uv_install_1/lightning-1', 'plugin', 'start', '/tmp/ltests-tui1vmrg/test_reckless_uv_install_1/lightning-1/reckless/testpluguv/testpluguv.py']' timed out after 15 seconds ``` Signed-off-by: Rusty Russell <[email protected]>
1 parent cbe7b37 commit 197f355

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_reckless.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import subprocess
33
from pathlib import PosixPath, Path
44
import socket
5-
from pyln.testing.utils import VALGRIND
5+
from pyln.testing.utils import VALGRIND, SLOW_MACHINE
66
import pytest
77
import os
88
import re
@@ -351,6 +351,7 @@ def test_tag_install(node_factory):
351351
header = line
352352

353353

354+
@unittest.skipIf(VALGRIND and SLOW_MACHINE, "node too slow for starting plugin under valgrind")
354355
def test_reckless_uv_install(node_factory):
355356
node = get_reckless_node(node_factory)
356357
node.start()

0 commit comments

Comments
 (0)