Commit 0e5d12295 for clamav.net
commit 0e5d12295e965fe32f272871f4c8eccc196b794f
Author: rma-x <max@suse.com>
Date: Fri May 30 20:06:00 2025 +0200
Tests: Fix freshclam test race condition
There is a race condition in the freshclam tests that triggers when the next server
starts quicker than the previous one exits after signaling it asynchronously.
This fix waits for the mockup server process to exit before moving on.
Resolves: https://github.com/Cisco-Talos/clamav/issues/1512
diff --git a/unit_tests/freshclam_test.py b/unit_tests/freshclam_test.py
index 94414bfb0..c82e17749 100644
--- a/unit_tests/freshclam_test.py
+++ b/unit_tests/freshclam_test.py
@@ -50,6 +50,7 @@ class TC(testcase.TestCase):
def tearDown(self):
if TC.mock_mirror != None:
TC.mock_mirror.terminate()
+ TC.mock_mirror.join()
TC.mock_mirror = None
# Clear the database directory