From: Remi Gacogne Date: Thu, 20 Mar 2025 13:40:21 +0000 (+0100) Subject: dnsdist: Grant a bit more time for the DNSdist process to exit X-Git-Tag: dnsdist-2.0.0-alpha2~104^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F15306%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Grant a bit more time for the DNSdist process to exit --- 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