Skip to content

Commit fac810b

Browse files
author
MarcoFalke
committed
test: Fix feature_startupnotify intermittent issue
1 parent 296e882 commit fac810b

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)