We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f6ac860 + 5a99a5d commit a51e18fCopy full SHA for a51e18f
wiremock/server/server.py
@@ -57,12 +57,15 @@ def start(self):
57
attempts = 0
58
success = False
59
while attempts < self.max_attempts:
60
- attempts += 1
61
- resp = requests.get("http://localhost:{}/__admin".format(self.port))
62
- if resp.status_code == 200:
63
- success = True
64
- break
65
- time.sleep(0.25)
+ try:
+ attempts += 1
+ resp = requests.get("http://localhost:{}/__admin".format(self.port))
+ if resp.status_code == 200:
+ success = True
+ break
66
+ time.sleep(0.25)
67
+ except requests.exceptions.ConnectionError:
68
+ pass
69
70
if not success:
71
raise WireMockServerNotStartedError("unable to get a successful GET http://localhost:{}/__admin response".format(self.port))
0 commit comments