Files
palladum-lightning/tests
Rusty Russell f68feaeb37 pytest: fix races now connecting is slightly slower.
We asserted that a node would be connected, but now we always call the
chanbackup peer_connected hook, it might not be that fast:

```
2025-05-17T08:37:58.7193306Z     def test_funding_fail(node_factory, bitcoind):
...
2025-05-17T08:37:58.7204037Z         # Restart l2 without ridiculous locktime.
2025-05-17T08:37:58.7204546Z         del l2.daemon.opts['watchtime-blocks']
2025-05-17T08:37:58.7204990Z         l2.restart()
2025-05-17T08:37:58.7206578Z         l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
2025-05-17T08:37:58.7207072Z     
2025-05-17T08:37:58.7207522Z         # We don't have enough left to cover fees if we try to spend it all.
2025-05-17T08:37:58.7208203Z         with pytest.raises(RpcError, match=r'not afford'):
2025-05-17T08:37:58.7208761Z             l1.rpc.fundchannel(l2.info['id'], funds)
2025-05-17T08:37:58.7209203Z     
2025-05-17T08:37:58.7209598Z         # Should still be connected (we didn't contact the peer)
2025-05-17T08:37:58.7210243Z         assert only_one(l1.rpc.listpeers()['peers'])['connected']
2025-05-17T08:37:58.7210875Z         l2.daemon.wait_for_log('Handed peer, entering loop')
2025-05-17T08:37:58.7211439Z >       assert only_one(l2.rpc.listpeers()['peers'])['connected']
2025-05-17T08:37:58.7211912Z E       assert False
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-05-17 13:05:04 -05:00
..
2025-05-02 13:34:21 -07:00