File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 11import uuid
22from tempfile import TemporaryDirectory
3+ from time import sleep
34from urllib .parse import quote
45
56import httpx
@@ -51,8 +52,16 @@ def ready(self):
5152 self .host_port = self .ports [f"{ GITLAB_LISTEN_PORT } /tcp" ][0 ]
5253 self .host_url = f"http://localhost:{ self .host_port } "
5354
54- response = httpx .get (self .host_url , follow_redirects = True )
55- return response .status_code == 200
55+ # we want gitlab to return a 200 several times in a row.
56+ # especially in the github runners it can act flaky otherwise.
57+ for _ in range (3 ):
58+ response = httpx .get (self .host_url , follow_redirects = True )
59+ if response .status_code != 200 :
60+ return False
61+
62+ sleep (5 )
63+
64+ return True
5665
5766
5867gitlab_container = container (
@@ -71,7 +80,7 @@ def ready(self):
7180 "{gitlab_logs_volume.name}" : {"bind" : "/var/log/gitlab" , "mode" : "rw" },
7281 },
7382 scope = "session" ,
74- timeout = 5 * 30 ,
83+ timeout = 5 * 60 ,
7584 wrapper_class = GitlabContainer ,
7685)
7786
You can’t perform that action at this time.
0 commit comments