mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-21 14:24:09 +01:00
tests: cleanup any unfinished/hanging channel opens
Otherwise it hangs on cleanup, as l2 is waiting for l1 to respond (and it's not going to), so the memleak call hangs.
This commit is contained in:
parent
b5aaee6679
commit
e95fc74884
1 changed files with 9 additions and 1 deletions
|
@ -3463,12 +3463,20 @@ def test_openchannel_init_alternate(node_factory, executor):
|
|||
|
||||
psbt1 = l1.rpc.fundpsbt('1000000msat', '253perkw', 250)['psbt']
|
||||
psbt2 = l2.rpc.fundpsbt('1000000msat', '253perkw', 250)['psbt']
|
||||
l1.rpc.openchannel_init(l2.info['id'], 100000, psbt1)
|
||||
init = l1.rpc.openchannel_init(l2.info['id'], 100000, psbt1)
|
||||
|
||||
fut = executor.submit(l2.rpc.openchannel_init, l1.info['id'], '1000000msat', psbt2)
|
||||
with pytest.raises(RpcError):
|
||||
fut.result(10)
|
||||
|
||||
# FIXME: Clean up so it doesn't hang. Ok if these fail.
|
||||
for node in [l1, l2]:
|
||||
try:
|
||||
node.rpc.openchannel_abort(init['channel_id'])
|
||||
except RpcError:
|
||||
# Ignoring all errors
|
||||
print("nothing to do")
|
||||
|
||||
|
||||
@unittest.skipIf(not EXPERIMENTAL_FEATURES, "quiescence is experimental")
|
||||
@pytest.mark.developer("quiescence triggering is dev only")
|
||||
|
|
Loading…
Add table
Reference in a new issue