]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Another case of a test calling the API before it is ready
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 22 Mar 2023 09:53:00 +0000 (10:53 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 3 Apr 2023 11:31:47 +0000 (13:31 +0200)
regression-tests.recursor-dnssec/test_PacketCache.py

index 80b015f6f9dd5533f742db347153a61605d05b95..ba8c102ddde4b97e407817d65d22cdcc976817c4 100644 (file)
@@ -47,6 +47,7 @@ f 3600 IN CNAME f            ; CNAME loop: dirty trick to get a ServFail in an a
         super(PacketCacheRecursorTest, cls).generateRecursorConfig(confdir)
 
     def checkPacketCacheMetrics(self, expectedHits, expectedMisses):
+        self.waitForTCPSocket("127.0.0.1", self._wsPort)
         headers = {'x-api-key': self._apiKey}
         url = 'http://127.0.0.1:' + str(self._wsPort) + '/api/v1/servers/localhost/statistics'
         r = requests.get(url, headers=headers, timeout=self._wsTimeout)