Skip to content

Commit 61f3515

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#26818: test: Fix feature_startupnotify intermittent issue
fac810b test: Fix feature_startupnotify intermittent issue (MarcoFalke) Pull request description: Might fix #25644 ACKs for top commit: aureleoules: ACK fac810b brunoerg: ACK fac810b Tree-SHA512: 870bf65da8120b6897d02e3bb70eea018d4761396abe64c3533bbc5237e65be9f77d35f62cd5d08cf7132dd53b504bf58229c33e18833c191495ad229c84d7c2
2 parents 296e882 + fac810b commit 61f3515

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

test/functional/feature_startupnotify.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,14 @@ def run_test(self):
2929
self.wait_until(lambda: os.path.exists(tmpdir_file))
3030

3131
self.log.info("Test -startupnotify is executed once")
32-
with open(tmpdir_file, "r", encoding="utf8") as f:
33-
file_content = f.read()
34-
assert_equal(file_content.count(FILE_NAME), 1)
32+
33+
def get_count():
34+
with open(tmpdir_file, "r", encoding="utf8") as f:
35+
file_content = f.read()
36+
return file_content.count(FILE_NAME)
37+
38+
self.wait_until(lambda: get_count() > 0)
39+
assert_equal(get_count(), 1)
3540

3641
self.log.info("Test node is fully started")
3742
assert_equal(self.nodes[0].getblockcount(), 200)

0 commit comments

Comments
 (0)