diff options
| author | John L. Villalovos <john@sodarock.com> | 2022-06-24 08:05:43 -0700 |
|---|---|---|
| committer | John L. Villalovos <john@sodarock.com> | 2022-06-24 08:05:43 -0700 |
| commit | bda020bf5f86d20253f39698c3bb32f8d156de60 (patch) | |
| tree | f0c3a2b9e2bf358f411b9309de16db36279c36e0 /tests/functional | |
| parent | f0ac3cda2912509d0a3132be8344e41ddcec71ab (diff) | |
| download | gitlab-bda020bf5f86d20253f39698c3bb32f8d156de60.tar.gz | |
chore(ci): increase timeout for docker container to come online
Have been seeing timeout issues more and more. Increase timeout from
200 seconds to 300 seconds (5 minutes).
Diffstat (limited to 'tests/functional')
| -rw-r--r-- | tests/functional/conftest.py | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/tests/functional/conftest.py b/tests/functional/conftest.py index e43b53b..09cdd69 100644 --- a/tests/functional/conftest.py +++ b/tests/functional/conftest.py @@ -154,8 +154,13 @@ def check_is_alive(): Return a healthcheck function fixture for the GitLab container spinup. """ - def _check(container): - logging.info("Checking if GitLab container is up...") + def _check(container: str, start_time: float) -> bool: + setup_time = time.perf_counter() - start_time + minutes, seconds = int(setup_time / 60), int(setup_time % 60) + logging.info( + f"Checking if GitLab container is up. " + f"Have been checking for {minutes} minute(s), {seconds} seconds ..." + ) logs = ["docker", "logs", container] return "gitlab Reconfigured!" in check_output(logs).decode() @@ -191,11 +196,18 @@ def gitlab_config(check_is_alive, docker_ip, docker_services, temp_dir, fixture_ config_file = temp_dir / "python-gitlab.cfg" port = docker_services.port_for("gitlab", 80) + start_time = time.perf_counter() logging.info("Waiting for GitLab container to become ready.") docker_services.wait_until_responsive( - timeout=200, pause=10, check=lambda: check_is_alive("gitlab-test") + timeout=300, + pause=10, + check=lambda: check_is_alive("gitlab-test", start_time=start_time), + ) + setup_time = time.perf_counter() - start_time + minutes, seconds = int(setup_time / 60), int(setup_time % 60) + logging.info( + f"GitLab container is now ready after {minutes} minute(s), {seconds} seconds" ) - logging.info("GitLab container is now ready.") token = set_token("gitlab-test", fixture_dir=fixture_dir) |
