Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbda020b

Browse files
chore(ci): increase timeout for docker container to come online
Have been seeing timeout issues more and more. Increase timeout from200 seconds to 300 seconds (5 minutes).
1 parentf0ac3cd commitbda020b

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

‎tests/functional/conftest.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,13 @@ def check_is_alive():
154154
Return a healthcheck function fixture for the GitLab container spinup.
155155
"""
156156

157-
def_check(container):
158-
logging.info("Checking if GitLab container is up...")
157+
def_check(container:str,start_time:float)->bool:
158+
setup_time=time.perf_counter()-start_time
159+
minutes,seconds=int(setup_time/60),int(setup_time%60)
160+
logging.info(
161+
f"Checking if GitLab container is up. "
162+
f"Have been checking for{minutes} minute(s),{seconds} seconds ..."
163+
)
159164
logs= ["docker","logs",container]
160165
return"gitlab Reconfigured!"incheck_output(logs).decode()
161166

@@ -191,11 +196,18 @@ def gitlab_config(check_is_alive, docker_ip, docker_services, temp_dir, fixture_
191196
config_file=temp_dir/"python-gitlab.cfg"
192197
port=docker_services.port_for("gitlab",80)
193198

199+
start_time=time.perf_counter()
194200
logging.info("Waiting for GitLab container to become ready.")
195201
docker_services.wait_until_responsive(
196-
timeout=200,pause=10,check=lambda:check_is_alive("gitlab-test")
202+
timeout=300,
203+
pause=10,
204+
check=lambda:check_is_alive("gitlab-test",start_time=start_time),
205+
)
206+
setup_time=time.perf_counter()-start_time
207+
minutes,seconds=int(setup_time/60),int(setup_time%60)
208+
logging.info(
209+
f"GitLab container is now ready after{minutes} minute(s),{seconds} seconds"
197210
)
198-
logging.info("GitLab container is now ready.")
199211

200212
token=set_token("gitlab-test",fixture_dir=fixture_dir)
201213

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp