From 3aa31d7cfd5f6a7f3f5fe4d053eb038d4bfbf853 Mon Sep 17 00:00:00 2001 From: Dustin Dettmer Date: Sat, 9 Oct 2021 09:27:54 -0700 Subject: [PATCH] On Mac OS X a different error is raised on failed connection [ Typo fixed --RR ] --- tests/test_connection.py | 4 ++-- tests/test_opening.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_connection.py b/tests/test_connection.py index 79940d9b2..ad673e587 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -96,7 +96,7 @@ def test_reconnect_channel_peers(node_factory, executor): wait_for(lambda: not only_one(l1.rpc.listpeers(l2.info['id'])['peers'])['connected']) # Now should fail. - with pytest.raises(RpcError, match=r'Connection refused'): + with pytest.raises(RpcError, match=r'(Connection refused|Bad file descriptor)'): l1.rpc.connect(l2.info['id'], 'localhost', l2.port) # Wait for exponential backoff to give us a 2 second window. @@ -2040,7 +2040,7 @@ def test_multifunding_best_effort(node_factory, bitcoind): # With 2 down, it will fail to fund channel l2.stop() l3.stop() - with pytest.raises(RpcError, match=r'Connection refused'): + with pytest.raises(RpcError, match=r'(Connection refused|Bad file descriptor)'): l1.rpc.multifundchannel(destinations, minchannels=2) # This works though. diff --git a/tests/test_opening.py b/tests/test_opening.py index 15cdbef8c..31e74d3d3 100644 --- a/tests/test_opening.py +++ b/tests/test_opening.py @@ -129,7 +129,7 @@ def test_multifunding_v2_best_effort(node_factory, bitcoind): # With 2 down, it will fail to fund channel l2.stop() l3.stop() - with pytest.raises(RpcError, match=r'Connection refused'): + with pytest.raises(RpcError, match=r'(Connection refused|Bad file descriptor)'): l1.rpc.multifundchannel(destinations, minchannels=2) # This works though.