aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_startupnotify.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/feature_startupnotify.py')
-rwxr-xr-xtest/functional/feature_startupnotify.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/functional/feature_startupnotify.py b/test/functional/feature_startupnotify.py
index f4672a2705..ff5272b281 100755
--- a/test/functional/feature_startupnotify.py
+++ b/test/functional/feature_startupnotify.py
@@ -29,9 +29,14 @@ class StartupNotifyTest(BitcoinTestFramework):
self.wait_until(lambda: os.path.exists(tmpdir_file))
self.log.info("Test -startupnotify is executed once")
- with open(tmpdir_file, "r", encoding="utf8") as f:
- file_content = f.read()
- assert_equal(file_content.count(FILE_NAME), 1)
+
+ def get_count():
+ with open(tmpdir_file, "r", encoding="utf8") as f:
+ file_content = f.read()
+ return file_content.count(FILE_NAME)
+
+ self.wait_until(lambda: get_count() > 0)
+ assert_equal(get_count(), 1)
self.log.info("Test node is fully started")
assert_equal(self.nodes[0].getblockcount(), 200)