From f20bacd270aa18c16be21d3d5d94cb1f48950478 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Wed, 22 Mar 2023 10:53:00 +0100 Subject: [PATCH] Another case of a test calling the API before it is ready --- regression-tests.recursor-dnssec/test_PacketCache.py | 1 + 1 file changed, 1 insertion(+) diff --git a/regression-tests.recursor-dnssec/test_PacketCache.py b/regression-tests.recursor-dnssec/test_PacketCache.py index 80b015f6f9..ba8c102ddd 100644 --- a/regression-tests.recursor-dnssec/test_PacketCache.py +++ b/regression-tests.recursor-dnssec/test_PacketCache.py @@ -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) -- 2.47.2