Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print out verbose info for a scheduler e2e test #74744

Merged
merged 1 commit into from
Mar 1, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 18 additions & 1 deletion test/e2e/scheduling/preemption.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,20 @@ var _ = SIGDescribe("PreemptionExecutionPath", func() {
priorityPairs := make([]priorityPair, 0)

AfterEach(func() {
// print out additional info if tests failed
if CurrentGinkgoTestDescription().Failed {
// list existing priorities
priorityList, err := cs.SchedulingV1().PriorityClasses().List(metav1.ListOptions{})
if err != nil {
framework.Logf("Unable to list priorities: %v", err)
} else {
framework.Logf("List existing priorities:")
for _, p := range priorityList.Items {
framework.Logf("%v/%v created at %v", p.Name, p.Value, p.CreationTimestamp)
}
}
}

if node != nil {
nodeCopy := node.DeepCopy()
// force it to update
Expand Down Expand Up @@ -428,6 +442,10 @@ var _ = SIGDescribe("PreemptionExecutionPath", func() {
priorityVal := int32(i)
priorityPairs = append(priorityPairs, priorityPair{name: priorityName, value: priorityVal})
_, err := cs.SchedulingV1().PriorityClasses().Create(&schedulerapi.PriorityClass{ObjectMeta: metav1.ObjectMeta{Name: priorityName}, Value: priorityVal})
if err != nil {
framework.Logf("Failed to create priority '%v/%v': %v", priorityName, priorityVal, err)
framework.Logf("Reason: %v. Msg: %v", errors.ReasonForError(err), err)
}
Expect(err == nil || errors.IsAlreadyExists(err)).To(Equal(true))
}
})
Expand Down Expand Up @@ -557,7 +575,6 @@ var _ = SIGDescribe("PreemptionExecutionPath", func() {
}
}
})

})

type pauseRSConfig struct {
Expand Down