]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Make sure all teardown class methods are called before raising a potential exception
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 10 Feb 2026 15:49:13 +0000 (16:49 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 10 Feb 2026 15:49:13 +0000 (16:49 +0100)
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
regression-tests.recursor-dnssec/recursortests.py
regression-tests.recursor-dnssec/test_TrustAnchors.py

index e5ca5da3925a7bd6a020908aa13e8ceb3fad257a..311a3ef2ce2c96603f1be1fe66bd31c4deab9e0a 100644 (file)
@@ -780,9 +780,27 @@ distributor-threads={threads}
 
     @classmethod
     def tearDownClass(cls):
-        cls.tearDownRecursor()
-        cls.tearDownAuth()
-        cls.tearDownResponders()
+        rec = None
+        auth = None
+        resp = None
+        try:
+            cls.tearDownRecursor()
+        except BaseException as e:
+            rec = e
+        try:
+            cls.tearDownAuth()
+        except BaseException as e:
+            auth = e
+        try:
+            cls.tearDownResponders()
+        except BaseException as e:
+            resp = e
+        if rec is not None:
+            raise rec
+        if auth is not None:
+            raise auth
+        if resp is not None:
+            raise resp
 
     @classmethod
     def tearDownResponders(cls):
index a8e532b3225cedb355089dce62a9801128904f9c..97f95fe7b34893493cc2b973d1922e03fa18bc68 100644 (file)
@@ -46,7 +46,7 @@ class TrustAnchorsDisabledTest(RecursorTest):
     """This test will do a query for "trustanchor.server CH TXT" and hopes to get
     a proper answer"""
 
-    _auth_zones = None
+    _auth_zones = {}
     _confdir = 'TrustAnchorsDisabled'
     _roothints = None
     _root_DS = None