From 547d3f0a0b10051e777474c81cdc7945a36ecba2 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Thu, 23 Nov 2017 13:08:36 +0100 Subject: [PATCH] pytest: Attempting to fix the flaky gossip test This seems to happen when we manage to check between the channel_announcement and the channel_update being processed. Signed-off-by: Christian Decker --- tests/test_lightningd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_lightningd.py b/tests/test_lightningd.py index bb96fac06..505e45fda 100644 --- a/tests/test_lightningd.py +++ b/tests/test_lightningd.py @@ -1285,7 +1285,7 @@ class LightningDTests(BaseLightningDTests): channels = l1.rpc.getchannels()['channels'] assert len(channels) == 2 - assert [c['active'] for c in channels] == [True, True] + wait_for(lambda: [c['active'] for c in channels] == [True, True]) def ping_tests(self, l1, l2): # 0-byte pong gives just type + length field. @@ -2314,6 +2314,6 @@ class LightningDTests(BaseLightningDTests): bitcoind.rpc.generate(99) l1.daemon.wait_for_log('onchaind complete, forgetting peer') l2.daemon.wait_for_log('onchaind complete, forgetting peer') - + if __name__ == '__main__': unittest.main(verbosity=2)