From fa4aec2b26696cc16dc44c6425f7dca3ef91c8ee Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Mon, 26 Apr 2021 08:22:47 +0200 Subject: [PATCH] test: Fix feature_notifications.py intermittent issue --- test/functional/feature_notifications.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/functional/feature_notifications.py b/test/functional/feature_notifications.py index 4e2de1daf42..6fc8773ee3c 100755 --- a/test/functional/feature_notifications.py +++ b/test/functional/feature_notifications.py @@ -166,6 +166,8 @@ class NotificationsTest(BitcoinTestFramework): # Should now verify contents of each file for tx_id, blockheight, blockhash in tx_details: fname = os.path.join(self.walletnotify_dir, notify_outputname(self.wallet, tx_id)) + # Wait for the cached writes to hit storage + self.wait_until(lambda: os.path.getsize(fname) > 0, timeout=10) with open(fname, 'rt', encoding='utf-8') as f: text = f.read() # Universal newline ensures '\n' on 'nt'