core-lightning/tests
Rusty Russell 185b377551 pytest: don't wait for channel active message in test_closing.py::test_penalty_htlc_tx_timeout
It might have already happened, and anyway, we wait for the actual state
below.

```
        # make database snapshot of l2
        l2.stop()
        l2_db_path = os.path.join(l2.daemon.lightning_dir, chainparams['name'], 'lightningd.sqlite3')
        l2_db_path_bak = os.path.join(l2.daemon.lightning_dir, chainparams['name'], 'lightningd.sqlite3.bak')
        copyfile(l2_db_path, l2_db_path_bak)
        l2.start()
        sync_blockheight(bitcoind, [l2])

        # push some money from l3->l2, so that the commit counter advances
        l2.rpc.connect(l3.info['id'], 'localhost', l3.port)
>       l2.daemon.wait_for_log('now ACTIVE')

tests/test_closing.py:908:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
contrib/pyln-testing/pyln/testing/utils.py:288: in wait_for_log
    return self.wait_for_logs([regex], timeout)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <pyln.testing.utils.LightningD object at 0x7f0c145a32d0>
regexs = ['now ACTIVE'], timeout = 60

    def wait_for_logs(self, regexs, timeout=TIMEOUT):
        """Look for `regexs` in the logs.

        We tail the stdout of the process and look for each regex in `regexs`,
        starting from last of the previous waited-for log entries (if any).  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()
        pos = self.logsearch_start
        while True:
            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('now ACTIVE')]" in logs.

contrib/pyln-testing/pyln/testing/utils.py:264: TimeoutError
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-08-13 10:39:56 +09:30
..
data hsmd/db: backfill pubkey information so that psbts signing works 2020-07-29 13:13:46 +02:00
plugins libplugin: allow commands and options to mark themselves deprecated. 2020-08-11 08:43:18 +09:30
vectors pytest: Add tests for the sphinx onion generation and processing 2020-03-12 10:25:01 +10:30
benchmark.py py-tests: rename 'announce' to 'wait_for_announce' 2018-12-08 15:15:55 -08:00
conftest.py
db.py pytest: Have the DB provider search for the postgres binary 2019-09-22 02:03:43 +00:00
fixtures.py pytest: Add a compat() fixture allowing checks for specific flags 2020-07-07 23:25:45 +02:00
test_closing.py pytest: don't wait for channel active message in test_closing.py::test_penalty_htlc_tx_timeout 2020-08-13 10:39:56 +09:30
test_connection.py pytest: add slow_test marker. 2020-08-07 13:57:31 +02:00
test_db.py hsmd/db: backfill pubkey information so that psbts signing works 2020-07-29 13:13:46 +02:00
test_gossip.py pytest: use get_nodes more widely. 2020-08-07 13:57:31 +02:00
test_invoices.py pytest: use get_nodes more widely. 2020-08-07 13:57:31 +02:00
test_misc.py pytest: make valgrind a per-node option. 2020-08-07 13:57:31 +02:00
test_onion.py pytest: Actually make sure that the direcory exists 2020-03-24 09:52:33 +10:30
test_pay.py pytest: Reproduce #3915 2020-08-12 19:10:48 +02:00
test_plugin.py libplugin: allow commands and options to mark themselves deprecated. 2020-08-11 08:43:18 +09:30
test_wallet.py pytest: fix occasional error in test_sign_and_send_psbt: 2020-08-13 10:39:56 +09:30
utils.py pytest: add slow_test marker. 2020-08-07 13:57:31 +02:00