From f91ff993ea197926e412188c99d76914f5ac34f1 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 18 Nov 2019 10:57:18 +1030 Subject: [PATCH] pytest: deflake test_htlc_send_timeout We can definitely get a pong from l1 (should test be slow enough): it's l3 we are concerned about. Signed-off-by: Rusty Russell --- tests/test_misc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_misc.py b/tests/test_misc.py index c28e99f35..77089169d 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -1221,9 +1221,9 @@ def test_htlc_send_timeout(node_factory, bitcoind): assert status['attempts'][0]['failure']['data']['erring_channel'] == chanid2 # L2 should send ping, but never receive pong so never send commitment. - l2.daemon.wait_for_log(r'channeld.*: \[OUT\] 0012') - assert not l2.daemon.is_in_log(r'channeld.*: \[IN\] 0013') - assert not l2.daemon.is_in_log(r'channeld.*: \[OUT\] 0084') + l2.daemon.wait_for_log(r'{}-.*channeld.*: \[OUT\] 0012'.format(l3.info['id'])) + assert not l2.daemon.is_in_log(r'{}-.*channeld.*: \[IN\] 0013'.format(l3.info['id'])) + assert not l2.daemon.is_in_log(r'{}-.*channeld.*: \[OUT\] 0084'.format(l3.info['id'])) # L2 killed the channel with l3 because it was too slow. l2.daemon.wait_for_log('{}-.*channeld-.*Adding HTLC too slow: killing connection'.format(l3.info['id']))