From b5c2d7d47daca1d0c87eb1380c012dde0bbe71a7 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Wed, 8 Feb 2017 16:56:39 +0100 Subject: [PATCH] pytest: Gossip subdaemon had a flaky test Whenever we were checking for the status before the daemon was initialized the test would fail. Now just waiting for the state transition. --- tests/test_lightningd.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_lightningd.py b/tests/test_lightningd.py index 48efc5229..157762744 100644 --- a/tests/test_lightningd.py +++ b/tests/test_lightningd.py @@ -120,6 +120,9 @@ class LightningDTests(BaseLightningDTests): p1 = l1.rpc.getpeer(l2.info['id']) p2 = l2.rpc.getpeer(l1.info['id']) + l1.daemon.wait_for_log('WIRE_GOSSIPSTATUS_PEER_READY') + l2.daemon.wait_for_log('WIRE_GOSSIPSTATUS_PEER_READY') + assert p1['condition'] == 'Exchanging gossip' assert p2['condition'] == 'Exchanging gossip'