From 52e82b76b6118ad777355a2a25c2fe089e290abd Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Wed, 20 Jan 2021 19:43:02 +0100 Subject: [PATCH] pytest: Stabilize test_bad_onion --- tests/test_misc.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test_misc.py b/tests/test_misc.py index f48c165df..f39c0570f 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -1718,8 +1718,7 @@ def test_bad_onion(node_factory, bitcoind): sha = re.search(r' 0087.{64}.{16}(.{64})', line).group(1) # Should see same sha in onionreply - line = l1.daemon.is_in_log(r'failcode .* from onionreply .*') - assert re.search(r'onionreply .*{}'.format(sha), line) + l1.daemon.wait_for_log(r'failcode .* from onionreply .*{sha}'.format(sha=sha)) # Replace id with a different pubkey, so onion encoded badly at second hop. route[1]['id'] = mangled_nodeid