From 5c7d2f09c1d5ff32ef2398ee447b899cada2ba33 Mon Sep 17 00:00:00 2001 From: niftynei Date: Mon, 2 Aug 2021 14:09:16 -0500 Subject: [PATCH] df-tests: wait for disconnect before asserting unknown channel fixes: FAILED tests/test_connection.py::test_funding_v2_corners - Failed: DID NOT RAISE --- tests/test_connection.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/test_connection.py b/tests/test_connection.py index a91dd7717..86c7d7070 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -1324,12 +1324,10 @@ def test_funding_v2_corners(node_factory, bitcoind): l1.rpc.disconnect(l2.info['id'], force=True) wait_for(lambda: len(l1.rpc.listpeers()['peers']) == 0) - if not len(l2.rpc.listpeers()['peers']) == 1: - assert l2.daemon.wait_for_log('Unsaved peer failed') - with pytest.raises(RpcError, match=r'Unknown channel'): l1.rpc.openchannel_abort(start['channel_id']) + wait_for(lambda: len(l2.rpc.listpeers()['peers']) == 0) with pytest.raises(RpcError, match=r'Unknown channel'): l2.rpc.openchannel_abort(start['channel_id'])