MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_connection_timeout

Function test_connection_timeout

tests/test_connection.py:3745–3758  ·  view source on GitHub ↗
(node_factory)

Source from the content-addressed store, hash-verified

3743@pytest.mark.skip('needs blackhold support')
3744@pytest.mark.openchannel('v1')
3745def test_connection_timeout(node_factory):
3746 # l1 hears nothing back after sending INIT, should time out.
3747 l1, l2 = node_factory.get_nodes(2,
3748 opts=[{'dev-timeout-secs': 1,
3749 'disconnect': ['0WIRE_INIT', '0WIRE_INIT']},
3750 {}])
3751
3752 with pytest.raises(RpcError, match='timed out'):
3753 l1.rpc.connect(l2.info['id'], 'localhost', port=l2.port)
3754 l1.daemon.wait_for_log('conn timed out')
3755
3756 with pytest.raises(RpcError, match=r'(reset by peer|peer closed connection)'):
3757 l2.rpc.connect(l1.info['id'], 'localhost', port=l1.port)
3758 l1.daemon.wait_for_log('conn timed out')
3759
3760
3761def test_htlc_retransmit_order(node_factory, executor):

Callers

nothing calls this directly

Calls 3

get_nodesMethod · 0.80
wait_for_logMethod · 0.80
connectMethod · 0.45

Tested by

no test coverage detected