Commit 922d78e
committed
pytest: fix flake in test_onionmessage_ratelimit.
By submitting them all at once, rather than serially, we should *definitely* hit the
ratelimit. We can also reduce the timeout (from 60 seconds) to speed the test up.
```
@pytest.mark.slow_test
def test_onionmessage_ratelimit(node_factory):
l1, l2 = node_factory.line_graph(2, fundchannel=False,
opts={'allow_warning': True})
offer = l2.rpc.call('offer', {'amount': '2msat',
'description': 'simple test'})
# Hopefully we can do this fast enough to reach ratelimit!
> with pytest.raises(RpcError, match="Timeout waiting for response"):
E Failed: DID NOT RAISE <class 'pyln.client.lightning.RpcError'>
tests/test_pay.py:5825: Failed
```
Signed-off-by: Rusty Russell <[email protected]>1 parent 2050f9a commit 922d78e
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5814 | 5814 | | |
5815 | 5815 | | |
5816 | 5816 | | |
5817 | | - | |
| 5817 | + | |
5818 | 5818 | | |
5819 | 5819 | | |
5820 | 5820 | | |
5821 | 5821 | | |
5822 | 5822 | | |
5823 | 5823 | | |
5824 | 5824 | | |
| 5825 | + | |
| 5826 | + | |
| 5827 | + | |
| 5828 | + | |
5825 | 5829 | | |
5826 | | - | |
5827 | | - | |
| 5830 | + | |
| 5831 | + | |
5828 | 5832 | | |
5829 | 5833 | | |
5830 | 5834 | | |
| |||
0 commit comments