]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: Fix a typo in the FWCatz regression tests 15429/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 14 Apr 2025 13:22:01 +0000 (15:22 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 14 Apr 2025 13:22:01 +0000 (15:22 +0200)
Observed on GH actions:
```
  test_FWCatz.py:353:
  _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

  self = <test_FWCatz.FWCatzXFRRecursorTest testMethod=testFWCatz>
  expected = {'forward_zones': [{'forwarders': ['1.2.3.4'], 'zone': 'c.'}]}

      def checkForwards(self, expected):
          attempts = 0
          tries = 10
          ex = None
          while attempts < tries:
              try:
                  with open('configs/' + self._confdir + '/catzone.forward.catz.') as file:
                      reality = yaml.safe_load(file);
                      if expected == reality:
                          return
              except Exception as e:
                  ex = e
              attempts = attempts + 1
  >           sleep(0.1)
  E           NameError: name 'sleep' is not defined
```

regression-tests.recursor-dnssec/test_FWCatz.py

index e8768bb7e85c106a31693efc6b21b009b6408261..7d619bca38727a86c2a37afa569e458e9a84ff46 100644 (file)
@@ -299,7 +299,7 @@ recursor:
             except Exception as e:
                 ex = e
             attempts = attempts + 1
-            sleep(0.1)
+            time.sleep(0.1)
         if ex is not None:
             raise ex
         raise AssertionError('expected content not found')