Skip to content

Commit 8c3d0a3

Browse files
committed
Move time.sleep to also wait when connection cannot be established
1 parent 0975120 commit 8c3d0a3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

wiremock/server/server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,11 @@ def start(self):
6363
if resp.status_code == 200:
6464
success = True
6565
break
66-
time.sleep(0.25)
6766
except requests.exceptions.ConnectionError:
6867
pass
6968

69+
time.sleep(0.25)
70+
7071
if not success:
7172
raise WireMockServerNotStartedError("unable to get a successful GET http://localhost:{}/__admin response".format(self.port))
7273

0 commit comments

Comments
 (0)