Skip to content

Commit

Permalink
Improve E2E tests for the gang-scheduling (#1801)
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
  • Loading branch information
tenzen-y authored May 11, 2023
1 parent 0a9d39a commit 485b1fb
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions sdk/python/test/e2e/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@ def verify_unschedulable_job_e2e(
logging.info(f"\n\n\n{job_kind} is creating")
client.wait_for_job_conditions(name, namespace, job_kind, {constants.JOB_CONDITION_CREATED})

# Job should have Created conditions.
conditions = client.get_job_conditions(name, namespace, job_kind)
if len(conditions) != 1:
raise Exception(f"{job_kind} conditions are invalid: {conditions}")

# Job should have correct conditions.
# Job should have a Created condition.
if not client.is_job_created(name, namespace, job_kind):
raise Exception(f"{job_kind} should be in Created condition")

# Job shouldn't have a Running condition.
if client.is_job_running(name, namespace, job_kind):
raise Exception(f"{job_kind} shouldn't be in Running condition")


def verify_job_e2e(
client: TrainingClient, name: str, namespace: str, job_kind: str, container: str, timeout: int = 600
Expand Down

0 comments on commit 485b1fb

Please sign in to comment.