flake: permit test_v2_open_sigs_restart_while_dead to succeed/fail

There's a race btw disconnecting and returning a successful RPC call for
openchannel_signed; if we disconnect quickly, we get an RPC error back.

Too slow and it returns w/o an error.

This needs to be cleaned up on a whole, work that I'm planning to get
into as part of a funder re-write. For now, let's just let the test
continue whether this call succeeds or fails.
This commit is contained in:
niftynei
2022-07-26 17:07:39 -05:00
committed by Rusty Russell
parent d3ba017672
commit 2c2bcc8eb4

View File

@@ -170,10 +170,12 @@ def test_v2_open_sigs_restart(node_factory, bitcoind):
assert log
psbt = re.search("psbt (.*)", log).group(1)
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
l1.daemon.wait_for_log('Peer has reconnected, state DUALOPEND_OPEN_INIT')
with pytest.raises(RpcError):
try:
# FIXME: why do we need to retry signed?
l1.rpc.openchannel_signed(chan_id, psbt)
except RpcError:
pass
l2.daemon.wait_for_log('Broadcasting funding tx')
txid = l2.rpc.listpeers(l1.info['id'])['peers'][0]['channels'][0]['funding_txid']
@@ -219,10 +221,12 @@ def test_v2_open_sigs_restart_while_dead(node_factory, bitcoind):
assert log
psbt = re.search("psbt (.*)", log).group(1)
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
l1.daemon.wait_for_log('Peer has reconnected, state DUALOPEND_OPEN_INIT')
with pytest.raises(RpcError):
try:
# FIXME: why do we need to retry signed?
l1.rpc.openchannel_signed(chan_id, psbt)
except RpcError:
pass
l2.daemon.wait_for_log('Broadcasting funding tx')
l2.daemon.wait_for_log('sendrawtx exit 0')