Skip to content

Commit abea90f

Browse files
tenzen-yszaher
authored andcommitted
Improve E2E tests for the gang-scheduling (kubeflow/trainer#1801)
Signed-off-by: Yuki Iwai <[email protected]>
1 parent cc80ada commit abea90f

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

python/test/e2e/utils.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@ def verify_unschedulable_job_e2e(
1717
logging.info(f"\n\n\n{job_kind} is creating")
1818
client.wait_for_job_conditions(name, namespace, job_kind, {constants.JOB_CONDITION_CREATED})
1919

20-
# Job should have Created conditions.
21-
conditions = client.get_job_conditions(name, namespace, job_kind)
22-
if len(conditions) != 1:
23-
raise Exception(f"{job_kind} conditions are invalid: {conditions}")
24-
25-
# Job should have correct conditions.
20+
# Job should have a Created condition.
2621
if not client.is_job_created(name, namespace, job_kind):
2722
raise Exception(f"{job_kind} should be in Created condition")
2823

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

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

0 commit comments

Comments
 (0)