@@ -385,6 +385,20 @@ var _ = SIGDescribe("PreemptionExecutionPath", func() {
385
385
priorityPairs := make ([]priorityPair , 0 )
386
386
387
387
AfterEach (func () {
388
+ // print out additional info if tests failed
389
+ if CurrentGinkgoTestDescription ().Failed {
390
+ // list existing priorities
391
+ priorityList , err := cs .SchedulingV1 ().PriorityClasses ().List (metav1.ListOptions {})
392
+ if err != nil {
393
+ framework .Logf ("Unable to list priorities: %v" , err )
394
+ } else {
395
+ framework .Logf ("List existing priorities:" )
396
+ for _ , p := range priorityList .Items {
397
+ framework .Logf ("%v/%v created at %v" , p .Name , p .Value , p .CreationTimestamp )
398
+ }
399
+ }
400
+ }
401
+
388
402
if node != nil {
389
403
nodeCopy := node .DeepCopy ()
390
404
// force it to update
@@ -428,6 +442,10 @@ var _ = SIGDescribe("PreemptionExecutionPath", func() {
428
442
priorityVal := int32 (i )
429
443
priorityPairs = append (priorityPairs , priorityPair {name : priorityName , value : priorityVal })
430
444
_ , err := cs .SchedulingV1 ().PriorityClasses ().Create (& schedulerapi.PriorityClass {ObjectMeta : metav1.ObjectMeta {Name : priorityName }, Value : priorityVal })
445
+ if err != nil {
446
+ framework .Logf ("Failed to create priority '%v/%v': %v" , priorityName , priorityVal , err )
447
+ framework .Logf ("Reason: %v. Msg: %v" , errors .ReasonForError (err ), err )
448
+ }
431
449
Expect (err == nil || errors .IsAlreadyExists (err )).To (Equal (true ))
432
450
}
433
451
})
@@ -557,7 +575,6 @@ var _ = SIGDescribe("PreemptionExecutionPath", func() {
557
575
}
558
576
}
559
577
})
560
-
561
578
})
562
579
563
580
type pauseRSConfig struct {
0 commit comments