Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: increase retries for log contains utils #156

Merged
merged 3 commits into from
Oct 19, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions src/deadline_test_fixtures/deadline/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ def assert_single_task_log_contains(
logs_client: BaseClient,
expected_pattern: re.Pattern | str,
assert_fail_msg: str = "Expected message not found in session log",
retries: int = 4,
retries: int = 6,
YutongLi291 marked this conversation as resolved.
Show resolved Hide resolved
backoff_factor: timedelta = timedelta(milliseconds=300),
) -> None:
"""
Expand Down Expand Up @@ -1171,7 +1171,7 @@ def assert_log_contains(
logs_client: BaseClient,
expected_pattern: re.Pattern | str,
assert_fail_msg: str = "Expected message not found in session log",
retries: int = 4,
retries: int = 6,
backoff_factor: timedelta = timedelta(milliseconds=300),
) -> None:
"""
Expand Down
4 changes: 2 additions & 2 deletions test/unit/deadline/test_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,7 @@ def test_assert_single_task_log_contains_success(self, job: Job, session: Sessio
expected_pattern=expected_pattern,
assert_fail_msg="Expected message not found in session log",
backoff_factor=datetime.timedelta(milliseconds=300),
retries=4,
retries=6,
)
mock_list_steps.assert_called_once_with(deadline_client=deadline_client)
step.list_tasks.assert_called_once_with(deadline_client=deadline_client)
Expand Down Expand Up @@ -1629,7 +1629,7 @@ def test_assert_logs_contains_fail(
f"{assert_fail_msg or 'Expected message not found in session log'}."
f" Logs are in CloudWatch log group: {session_log_group_name}"
)
expected_retries = retries if retries is not None else 4
expected_retries = retries if retries is not None else 6
expected_backoff_factor = (
backoff_factor if backoff_factor is not None else datetime.timedelta(milliseconds=300)
)
Expand Down