Skip to content

Commit

Permalink
Merge pull request volcano-sh#313 from k82cn/mul_e2e
Browse files Browse the repository at this point in the history
Added e2e for multiple jobs.
  • Loading branch information
k82cn authored Jul 27, 2018
2 parents 7c858ae + b278cf8 commit 2e82aa9
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions test/e2e.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,26 @@ var _ = Describe("E2E Test", func() {
Expect(err).NotTo(HaveOccurred())
})

It("Multiple Schedule QueueJobs", func() {
context := initTestContext()
defer cleanupTestContext(context)

rep := clusterSize(context, oneCPU)

qj1 := createQueueJob(context, "qj-1", 2, rep, "busybox", oneCPU, nil)
qj2 := createQueueJob(context, "qj-2", 2, rep, "busybox", oneCPU, nil)
qj3 := createQueueJob(context, "qj-3", 2, rep, "busybox", oneCPU, nil)

err := waitJobReady(context, qj1.Name)
Expect(err).NotTo(HaveOccurred())

err = waitJobReady(context, qj2.Name)
Expect(err).NotTo(HaveOccurred())

err = waitJobReady(context, qj3.Name)
Expect(err).NotTo(HaveOccurred())
})

It("Gang scheduling", func() {
context := initTestContext()
defer cleanupTestContext(context)
Expand Down Expand Up @@ -82,6 +102,33 @@ var _ = Describe("E2E Test", func() {
Expect(err).NotTo(HaveOccurred())
})

It("Multiple Preemption", func() {
context := initTestContext()
defer cleanupTestContext(context)

slot := oneCPU
rep := clusterSize(context, slot)

qj1 := createQueueJob(context, "preemptee-qj", 1, rep, "nginx", slot, nil)
err := waitTasksReady(context, qj1.Name, int(rep))
Expect(err).NotTo(HaveOccurred())

qj2 := createQueueJob(context, "preemptor-qj", 1, rep, "nginx", slot, nil)
Expect(err).NotTo(HaveOccurred())

qj3 := createQueueJob(context, "preemptor-qj2", 1, rep, "nginx", slot, nil)
Expect(err).NotTo(HaveOccurred())

err = waitTasksReady(context, qj1.Name, int(rep)/3)
Expect(err).NotTo(HaveOccurred())

err = waitTasksReady(context, qj2.Name, int(rep)/3)
Expect(err).NotTo(HaveOccurred())

err = waitTasksReady(context, qj3.Name, int(rep)/3)
Expect(err).NotTo(HaveOccurred())
})

It("TaskPriority", func() {
Skip("Skip TaskPriority test because of dind setting.")
context := initTestContext()
Expand Down

0 comments on commit 2e82aa9

Please sign in to comment.