Skip to content

Commit

Permalink
pytest: fix flake in test_multichan.
Browse files Browse the repository at this point in the history
I have a separate branch which fixes this race properly, but it's not anything
to do with this PR.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell committed Mar 31, 2022
1 parent 78b5a37 commit 75b0af1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -3893,7 +3893,11 @@ def test_multichan(node_factory, executor, bitcoind):

# Restart with multiple channels works.
l3.restart()
l3.rpc.connect(l2.info['id'], 'localhost', l2.port)
# FIXME: race against autoconnect can cause spurious failure (but we connect!)
try:
l3.rpc.connect(l2.info['id'], 'localhost', l2.port)
except RpcError:
wait_for(lambda: only_one(l3.rpc.listpeers(l2.info['id'])['peers'])['connected'])

inv = l3.rpc.invoice(100000000, "invoice4", "invoice4")
l1.rpc.pay(inv['bolt11'])

0 comments on commit 75b0af1

Please sign in to comment.