From 4250f3b8a19f1f56a5eba21b1c3d33e9f2b17924 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Wed, 10 Mar 2021 21:00:58 +0100 Subject: [PATCH] test_lnpeer: use 2s MPP_TIMEOUT, and split test_multipart_payment_with_timeout --- electrum/tests/test_lnpeer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/electrum/tests/test_lnpeer.py b/electrum/tests/test_lnpeer.py index a565606e7..a14906069 100644 --- a/electrum/tests/test_lnpeer.py +++ b/electrum/tests/test_lnpeer.py @@ -113,7 +113,8 @@ class MockWallet: class MockLNWallet(Logger, NetworkRetryManager[LNPeerAddr]): - MPP_EXPIRY = 1 + MPP_EXPIRY = 2 # HTLC timestamps are cast to int, so this cannot be 1 + def __init__(self, *, local_keypair: Keypair, chans: Iterable['Channel'], tx_queue, name): self.name = name Logger.__init__(self) @@ -779,6 +780,7 @@ class TestPeer(ElectrumTestCase): with self.assertRaises(NoPathFound): run(self._run_mpp(graph, attempts=1)) graph.w_b.enable_htlc_forwarding.set() + run(asyncio.sleep(1)) # sleep to that the other htlc can fail with self.assertRaises(PaymentDone): run(self._run_mpp(graph, attempts=1))