Skip to content

Commit

Permalink
review comment: use waitForJobAdmitted in appwrapper test
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrove-oss committed Jan 29, 2025
1 parent 4baaeab commit cb15631
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions test/e2e/multikueue/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -475,23 +475,8 @@ var _ = ginkgo.Describe("MultiKueue", func() {
createdWorkload := &kueue.Workload{}
wlLookupKey := types.NamespacedName{Name: workloadaw.GetWorkloadNameForAppWrapper(aw.Name, aw.UID), Namespace: managerNs.Name}

// the execution should be given to the worker
ginkgo.By("Waiting to be admitted in worker1 and manager", func() {
gomega.Eventually(func(g gomega.Gomega) {
g.Expect(k8sManagerClient.Get(ctx, wlLookupKey, createdWorkload)).To(gomega.Succeed())
g.Expect(workload.FindAdmissionCheck(createdWorkload.Status.AdmissionChecks, multiKueueAc.Name)).To(gomega.BeComparableTo(&kueue.AdmissionCheckState{
Name: multiKueueAc.Name,
State: kueue.CheckStateReady,
Message: `The workload got reservation on "worker1"`,
}, cmpopts.IgnoreFields(kueue.AdmissionCheckState{}, "LastTransitionTime")))
g.Expect(apimeta.FindStatusCondition(createdWorkload.Status.Conditions, kueue.WorkloadAdmitted)).To(gomega.BeComparableTo(&metav1.Condition{
Type: kueue.WorkloadAdmitted,
Status: metav1.ConditionTrue,
Reason: "Admitted",
Message: "The workload is admitted",
}, util.IgnoreConditionTimestampsAndObservedGeneration))
}, util.Timeout, util.Interval).Should(gomega.Succeed())
})
// the execution should be given to worker 1
waitForJobAdmitted(wlLookupKey, multiKueueAc.Name, "worker1")

ginkgo.By("Waiting for the appwrapper to get status updates", func() {
gomega.Eventually(func(g gomega.Gomega) {
Expand Down

0 comments on commit cb15631

Please sign in to comment.