Skip to content

Commit 14bb91c

Browse files
Add garbage collection to free memory before running DVC tests
1 parent 58885d2 commit 14bb91c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/deltares_testbench/src/suite/test_set_runner.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Copyright (C) Stichting Deltares, 2026
44
"""
55

6+
import gc
67
import multiprocessing
78
import os
89
import shutil
@@ -107,6 +108,10 @@ def run(self) -> None:
107108
# Prepare DVC cases: batch-download all .dvc files in one command
108109
self.__prepare_dvc_test_cases()
109110

111+
# Free memory accumulated during DVC preparation (repo objects, file
112+
# indices, etc.) so the forked worker pool starts with a lean parent.
113+
gc.collect()
114+
110115
results = (
111116
self.run_tests_in_parallel()
112117
if self.__settings.command_line_settings.parallel

0 commit comments

Comments
 (0)