From b74a6ffc16740c1a8c0b93a8b4aa34bc1a1b819a Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Tue, 13 Dec 2022 15:48:37 +0100 Subject: [PATCH] qa: unflake test_rescan_edge_cases We weren't waiting for lianad to be back to the same height as bitcoind. Necessarily it could happen that sorted_coins() would return an empty list. Fixes #142 (did 50 successful runs of the test) --- tests/test_chain.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_chain.py b/tests/test_chain.py index eb2b7e6c..cd63cb5a 100644 --- a/tests/test_chain.py +++ b/tests/test_chain.py @@ -222,6 +222,7 @@ def test_rescan_edge_cases(lianad, bitcoind): lianad.stop() lianad.start() wait_for(lambda: lianad.rpc.getinfo()["rescan_progress"] is None) + wait_synced() assert coins_before == sorted_coins() # Lose our state again