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

make timeout configurable from e2e tests #1787

Merged
merged 1 commit into from
Mar 24, 2023
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
2 changes: 2 additions & 0 deletions sdk/python/test/e2e/test_e2e_pytorchjob.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def test_sdk_e2e_with_gang_scheduling(job_namespace):
job_namespace,
constants.PYTORCHJOB_KIND,
CONTAINER_NAME,
timeout=900,
)

TRAINING_CLIENT.delete_pytorchjob(JOB_NAME, job_namespace)
Expand Down Expand Up @@ -134,6 +135,7 @@ def test_sdk_e2e(job_namespace):
job_namespace,
constants.PYTORCHJOB_KIND,
CONTAINER_NAME,
timeout=900,
)

TRAINING_CLIENT.delete_pytorchjob(JOB_NAME, job_namespace)
Expand Down
4 changes: 2 additions & 2 deletions sdk/python/test/e2e/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ def verify_unschedulable_job_e2e(


def verify_job_e2e(
client: TrainingClient, name: str, namespace: str, job_kind: str, container: str
client: TrainingClient, name: str, namespace: str, job_kind: str, container: str, timeout: int = 600
):
"""Verify Training Job e2e test."""

# Wait until Job is Succeeded.
logging.info(f"\n\n\n{job_kind} is running")
client.wait_for_job_conditions(name, namespace, job_kind)
client.wait_for_job_conditions(name, namespace, job_kind, timeout=timeout)

# Job should have Created, Running, and Succeeded conditions.
conditions = client.get_job_conditions(name, namespace, job_kind)
Expand Down