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

chore: bump version of GitLab to 15.4.6-ee.0#2498

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
JohnVillalovos wants to merge2 commits intomainfromjlvillal/bump_ee_version
Closed
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 31 additions & 13 deletionstests/functional/conftest.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -209,7 +209,32 @@ def _check(
return _check


@pytest.fixture
def wait_for_sidekiq_function(
*,
gl_instance: gitlab.Gitlab,
timeout: int = 30,
step: float = 0.5,
allow_fail: bool = False,
) -> bool:
"""A function that is called to wait for the sidekiq process to finish. As
opposed to the fixture."""
for count in range(timeout):
time.sleep(step)
busy = False
process_metrics = gl_instance.sidekiq.process_metrics()
assert isinstance(process_metrics, dict)
processes = process_metrics["processes"]
for process in processes:
if process["busy"]:
busy = True
if not busy:
return True
logging.info(f"sidekiq busy {count} of {timeout}")
assert allow_fail, "sidekiq process should have terminated but did not."
return False


@pytest.fixture(scope="function")
def wait_for_sidekiq(gl):
"""
Return a helper function to wait until there are no busy sidekiq processes.
Expand All@@ -218,18 +243,9 @@ def wait_for_sidekiq(gl):
"""

def _wait(timeout: int = 30, step: float = 0.5, allow_fail: bool = False) -> bool:
for count in range(timeout):
time.sleep(step)
busy = False
processes = gl.sidekiq.process_metrics()["processes"]
for process in processes:
if process["busy"]:
busy = True
if not busy:
return True
logging.info(f"sidekiq busy {count} of {timeout}")
assert allow_fail, "sidekiq process should have terminated but did not."
return False
return wait_for_sidekiq_function(
gl_instance=gl, timeout=timeout, step=step, allow_fail=allow_fail
)

return _wait

Expand DownExpand Up@@ -529,6 +545,8 @@ def user(gl):

yield user

result = wait_for_sidekiq_function(gl_instance=gl, timeout=60)
assert result is True, "sidekiq process should have terminated but did not"
# Use `hard_delete=True` or a 'Ghost User' may be created.
helpers.safe_delete(user, hard_delete=True)

Expand Down
3 changes: 2 additions & 1 deletiontests/functional/fixtures/.env
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
GITLAB_IMAGE=gitlab/gitlab-ee
GITLAB_TAG=15.4.0-ee.0
# GITLAB_TAG=15.6.8-ee.0
GITLAB_TAG=15.6.0-ee.0

[8]ページ先頭

©2009-2025 Movatter.jp