From 9f8c9d64064b2509b31bf48df65918dc855efce2 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Wed, 7 Oct 2020 10:26:16 +0200 Subject: [PATCH] pytest: Check for connection close and reset errors in timeout test I get both errors from time to time, seems like a timing issue. --- tests/test_connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_connection.py b/tests/test_connection.py index d7a772068..a5c68cd22 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -2657,6 +2657,6 @@ def test_connection_timeout(node_factory): l1.rpc.connect(l2.info['id'], 'localhost', port=l2.port) l1.daemon.wait_for_log('conn timed out') - with pytest.raises(RpcError, match='reset by peer'): + with pytest.raises(RpcError, match=r'(reset by peer|peer closed connection)'): l2.rpc.connect(l1.info['id'], 'localhost', port=l1.port) l1.daemon.wait_for_log('conn timed out')