]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Wait for webserver before querying
authorOtto <otto.moerbeek@open-xchange.com>
Tue, 21 Dec 2021 16:36:08 +0000 (17:36 +0100)
committerOtto <otto.moerbeek@open-xchange.com>
Wed, 22 Dec 2021 10:08:50 +0000 (11:08 +0100)
regression-tests.recursor-dnssec/test_Prometheus.py

index 7c8c599e4b7963f90a220e11d2be50aec488c53f..dc82f80fd7e54bb45938add3c9a498b2f63ed764 100644 (file)
@@ -74,6 +74,7 @@ api-key=%s
 """ % (_wsPort, _wsPassword, _apiKey)
 
     def testPrometheus(self):
+        self.waitForTCPSocket("127.0.0.1", self._wsPort)
         url = 'http://user:' + self._wsPassword + '@127.0.0.1:' + str(self._wsPort) + '/metrics'
         r = requests.get(url, timeout=self._wsTimeout)
         self.assertTrue(r)