]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Fix a possible race in the CDB reload regression tests 11838/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 9 Aug 2022 11:22:25 +0000 (13:22 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 9 Aug 2022 11:22:25 +0000 (13:22 +0200)
regression-tests.dnsdist/test_CDB.py

index 2ed764ce86b08b7dfb58feee9d75486f278a7ebc..f4095aeac55a0620dd166ffb683499d55bdacd16 100644 (file)
@@ -184,6 +184,9 @@ class TestCDBReload(CDBTest):
             self.assertEqual(expectedResponse, receivedResponse)
 
         # write a new CDB which has no entry for 127.0.0.1
+        # first ensure that the mtime will change after writing
+        # the new version
+        time.sleep(1)
         writeCDB(self._cdbFileName, 2)
         # wait long enough for the CDB database to be reloaded
         time.sleep(self._cdbRefreshDelay + 1)