From b41ee9046542cba8e02d426a3de5a8954b67a709 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Thu, 20 Mar 2025 14:40:21 +0100 Subject: [PATCH] dnsdist: Grant a bit more time for the DNSdist process to exit --- regression-tests.dnsdist/dnsdisttests.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/regression-tests.dnsdist/dnsdisttests.py b/regression-tests.dnsdist/dnsdisttests.py index fbf757454d..81457e5c40 100644 --- a/regression-tests.dnsdist/dnsdisttests.py +++ b/regression-tests.dnsdist/dnsdisttests.py @@ -224,7 +224,7 @@ class DNSDistTest(AssertEqualDNSMessageMixin, unittest.TestCase): return try: p.terminate() - for count in range(20): + for count in range(50): x = p.poll() if x is not None: break @@ -234,7 +234,10 @@ class DNSDistTest(AssertEqualDNSMessageMixin, unittest.TestCase): p.kill() p.wait() if p.returncode != 0: - raise AssertionError('Process exited with return code %d' % (p.returncode)) + if p.returncode < 0: + raise AssertionError('Process was killed by signal %d' % (-p.returncode)) + else: + raise AssertionError('Process exited with return code %d' % (p.returncode)) except OSError as e: # There is a race-condition with the poll() and # kill() statements, when the process is dead on the -- 2.47.2