core-lightning/tests
Rusty Russell 54a5eddee7 pytest: mark xpay real gossip test as slow
```
____________________ ERROR at teardown of test_xpay_maxfee _____________________
...
            # Format a nice list of everything that went wrong and raise an exception
            request.node.has_errors = True
>           raise ValueError(str(errors))
E           ValueError: 
E           Node errors:
E            - lightningd-1: Node exited with return code 1
E           Global errors:
```

And:

```
    @unittest.skipIf(TEST_NETWORK != 'regtest', 'too dusty on elements')
    def test_xpay_maxfee(node_factory, bitcoind, chainparams):
        """Test which shows that we don't excees maxfee"""
        outfile = tempfile.NamedTemporaryFile(prefix='gossip-store-')
        subprocess.check_output(['devtools/gossmap-compress',
                                 'decompress',
                                 '--node-map=3301=022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59',
                                 'tests/data/gossip-store-2024-09-22.compressed',
                                 outfile.name]).decode('utf-8').splitlines()
        AMOUNT = 100_000_000
    
        # l2 will warn l1 about its invalid gossip: ignore.
        # We throttle l1's gossip to avoid massive log spam.
>       l1, l2 = node_factory.line_graph(2,
                                         # This is in sats, so 1000x amount we send.
                                         fundamount=AMOUNT,
                                         opts=[{'gossip_store_file': outfile.name,
                                                'subdaemon': 'channeld:../tests/plugins/channeld_fakenet',
                                                'allow_warning': True,
                                                'dev-throttle-gossip': None},
                                               {'allow_bad_gossip': True}])

tests/test_xpay.py:509: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
contrib/pyln-testing/pyln/testing/utils.py:1720: in line_graph
    nodes = self.get_nodes(num_nodes, opts=opts)
contrib/pyln-testing/pyln/testing/utils.py:1602: in get_nodes
    return [j.result() for j in jobs]
contrib/pyln-testing/pyln/testing/utils.py:1602: in <listcomp>
    return [j.result() for j in jobs]
/opt/hostedtoolcache/Python/3.10.16/x64/lib/python3.10/concurrent/futures/_base.py:458: in result
    return self.__get_result()
/opt/hostedtoolcache/Python/3.10.16/x64/lib/python3.10/concurrent/futures/_base.py:403: in __get_result
    raise self._exception
/opt/hostedtoolcache/Python/3.10.16/x64/lib/python3.10/concurrent/futures/thread.py:58: in run
    result = self.fn(*self.args, **self.kwargs)
contrib/pyln-testing/pyln/testing/utils.py:1653: in get_node
    node.start(wait_for_bitcoind_sync)
contrib/pyln-testing/pyln/testing/utils.py:1015: in start
    self.daemon.start(stderr_redir=stderr_redir)
contrib/pyln-testing/pyln/testing/utils.py:671: in start
    self.wait_for_log("Server started with public key")
contrib/pyln-testing/pyln/testing/utils.py:355: in wait_for_log
    return self.wait_for_logs([regex], timeout)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pyln.testing.utils.LightningD object at 0x7f27ab586c20>
regexs = ['Server started with public key'], timeout = 180

    def wait_for_logs(self, regexs, timeout=TIMEOUT):
        """Look for `regexs` in the logs.
    
        The logs contain tailed stdout of the process. We look for each regex
        in `regexs`, starting from `logsearch_start` which normally is the
        position of the last found entry of a previous wait-for logs call.
        The ordering inside `regexs` doesn't matter.
    
        We fail if the timeout is exceeded or if the underlying process
        exits before all the `regexs` were found.
    
        If timeout is None, no time-out is applied.
        """
        logging.debug("Waiting for {} in the logs".format(regexs))
        exs = [re.compile(r) for r in regexs]
        start_time = time.time()
        while True:
            if self.logsearch_start >= len(self.logs):
                if not self.logs_catchup():
                    time.sleep(0.25)
    
                if timeout is not None and time.time() > start_time + timeout:
                    print("Time-out: can't find {} in logs".format(exs))
                    for r in exs:
                        if self.is_in_log(r):
                            print("({} was previously in logs!)".format(r))
>                   raise TimeoutError('Unable to find "{}" in logs.'.format(exs))
E                   TimeoutError: Unable to find "[re.compile('Server started with public key')]" in logs.
```

gossipd (and other plugins) simply take too long to digest the gossmap under valgrind.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-01-27 11:07:04 +10:30
..
data tests: Reckless test fix for project must contain name 2025-01-09 11:15:05 +01:00
fuzz splice: Update splice signature msg type 2024-11-21 14:15:36 +10:30
plugins ccan/htable: update to explicit DUPS/NODUPS types. 2025-01-21 09:18:25 +10:30
vectors pytest: Remove onion test vectors containing legacy onions. 2022-03-18 09:20:11 +10:30
autogenerate-rpc-examples.py tests: Add logger config with fixture 2025-01-24 17:00:03 +10:30
benchmark.py pytest: always provide payment_secret when making payments. 2021-07-14 14:38:00 -05:00
conftest.py pytest: use --developer instead of environment variable. 2023-09-21 20:08:24 +09:30
fixtures.py pytest: use --developer instead of environment variable. 2023-09-21 20:08:24 +09:30
rkls_github_canned_server.py pytest: add blackbox tests for reckless 2023-04-09 12:41:11 +09:30
test_askrene.py xpay: add maxdelay parameter 2025-01-22 12:19:47 -08:00
test_bookkeeper.py pytest: don't set experimental-offers in tests: it's the default now. 2024-11-18 10:42:54 +01:00
test_cln_rs.py lightningd: deprecate decodepay. 2024-11-17 14:21:23 +10:30
test_clnrest.py tests: adjust cln-grpc tests for new default start 2024-11-12 09:43:54 +10:30
test_closing.py pytest: fix flake in test_penalty_htlc_tx_fulfill 2024-12-20 15:36:07 +10:30
test_connection.py pytest: fix flake in tests/test_connection.py::test_reconnect_signed 2025-01-27 11:07:04 +10:30
test_db.py pytest: adapt tests to avoid deprecated APIs in close (tx and txid). 2024-11-17 16:04:06 +10:30
test_gossip.py pytest: fix flake in test_gossip_throttle 2024-12-20 15:36:07 +10:30
test_invoices.py lightningd: deprecate decodepay. 2024-11-17 14:21:23 +10:30
test_misc.py pytest: fix flake in test_restorefrompeer. 2024-12-20 15:36:07 +10:30
test_mkfunding.py pytest: add tests for devtools/mkfunding 2023-01-09 14:50:30 -06:00
test_onion.py lightningd: remove support for legacy onion format. 2022-03-18 09:20:11 +10:30
test_opening.py xpay: make the xpay layer persistent. 2024-11-18 11:03:26 +10:30
test_pay.py lightningd: populate listsendpays destination from injectpaymentonion if we can. 2024-12-17 08:14:45 +10:30
test_plugin.py pytest: fix race in test_autoclean. 2024-11-19 17:51:18 +10:30
test_reckless.py test: Fixed test plugin source paths for reckless 2024-11-19 09:06:28 +10:30
test_renepay.py renepay: add test for description interface 2024-11-06 09:59:27 +01:00
test_restart.py splice: tx_abort no longer reestablishes 2024-11-21 14:15:36 +10:30
test_runes.py pytest: don't set experimental-offers in tests: it's the default now. 2024-11-18 10:42:54 +01:00
test_splice.py bkpr: add bookkeeping assertions to splice in + out tests 2024-11-17 14:25:29 +10:30
test_splicing.py splice: tx_abort no longer reestablishes 2024-11-21 14:15:36 +10:30
test_splicing_disconnect.py splice: tx_abort no longer reestablishes 2024-11-21 14:15:36 +10:30
test_splicing_insane.py splice: Allow splice_update to return signatures 2024-11-12 06:42:52 +10:30
test_wallet.py pytest: fix hsmtool which reports leak under address sanitizer. 2024-11-17 14:09:10 +10:30
test_xpay.py pytest: mark xpay real gossip test as slow 2025-01-27 11:07:04 +10:30
utils.py tests: Add testnet4 default port 2025-01-13 15:45:19 -08:00
valgrind-suppressions.txt pytest: Use valgrind target suppressions instead of skipping tests 2022-03-10 10:21:41 +10:30