Skip to content

Commit 3abda6a

Browse files
committed
Bugfix: QA: test_node: Ensure debug.log exists at start of assert_debug_log
1 parent 96ec3b6 commit 3abda6a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

test/functional/test_framework/test_node.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,12 @@ def assert_debug_log(self, expected_msgs, unexpected_msgs=None, timeout=2):
451451
assert_equal(type(expected_msgs), list)
452452
assert_equal(type(unexpected_msgs), list)
453453

454+
if not self.debug_log_path.exists():
455+
# File must exist for this to work
456+
os.makedirs(self.debug_log_path.parent, exist_ok=True)
457+
with open(self.debug_log_path, mode='a', encoding='utf-8'):
458+
pass
459+
454460
time_end = time.time() + timeout * self.timeout_factor
455461
prev_size = self.debug_log_size(encoding="utf-8") # Must use same encoding that is used to read() below
456462

0 commit comments

Comments
 (0)