Skip to content

Commit

Permalink
e2e: fix reclaim nitx
Browse files Browse the repository at this point in the history
    fix reclaim nits

Signed-off-by: alcorj.mizar <alcorj.mizar@gmail.com>
  • Loading branch information
alcorj-mizar committed Jul 7, 2020
1 parent cc2b43c commit 869f690
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/e2e/reclaim.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ var _ = Describe("Reclaim E2E Test", func() {
err := waitQueueStatus(func() (bool, error) {
queue, err := ctx.vcclient.SchedulingV1beta1().Queues().Get(context.TODO(), queue, metav1.GetOptions{})
Expect(err).NotTo(HaveOccurred(), "Get queue %s failed", queue)
switch state := status; state {
switch status {
case "Running":
return queue.Status.Running == 1, nil
return queue.Status.Running == num, nil
case "Open":
return queue.Status.State == schedulingv1beta1.QueueStateOpen, nil
case "Pending":
return queue.Status.Pending == 1, nil
return queue.Status.Pending == num, nil
default:
return false, nil
}
Expand Down Expand Up @@ -140,7 +140,7 @@ var _ = Describe("Reclaim E2E Test", func() {

// delete pod of job3 to make sure reclaim-j3 podgroup is pending
listOptions := metav1.ListOptions{
LabelSelector: labels.Set(map[string]string{"volcano.sh/job-name": j3}).String(),
LabelSelector: labels.Set(map[string]string{batchv1alpha1.JobNameKey: j3}).String(),
}

job3pods, err := ctx.kubeclient.CoreV1().Pods(ctx.namespace).List(context.TODO(), listOptions)
Expand Down

0 comments on commit 869f690

Please sign in to comment.