mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 09:46:52 -05:00
test: Fix feature_startupnotify intermittent issue
This commit is contained in:
parent
296e882250
commit
fac810bb0a
1 changed files with 8 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue