priority pid tests should match on processes
pids 0 process should not be nonzero
This commit is contained in:
@@ -738,7 +738,6 @@ func process(stats statsFunc) cmpFunc {
|
||||
|
||||
p1Process := processUsage(p1Stats.ProcessStats)
|
||||
p2Process := processUsage(p2Stats.ProcessStats)
|
||||
// prioritize evicting the pod which has the larger consumption of process
|
||||
return int(p2Process - p1Process)
|
||||
}
|
||||
}
|
||||
|
@@ -475,6 +475,7 @@ var _ = SIGDescribe("PriorityPidEvictionOrdering", framework.WithSlow(), framewo
|
||||
|
||||
highPriorityClassName := f.BaseName + "-high-priority"
|
||||
highPriority := int32(999999999)
|
||||
processes := 30000
|
||||
|
||||
ginkgo.Context(fmt.Sprintf(testContextFmt, expectedNodeCondition), func() {
|
||||
tempSetCurrentKubeletConfig(f, func(ctx context.Context, initialConfig *kubeletconfig.KubeletConfiguration) {
|
||||
@@ -497,7 +498,7 @@ var _ = SIGDescribe("PriorityPidEvictionOrdering", framework.WithSlow(), framewo
|
||||
specs := []podEvictSpec{
|
||||
{
|
||||
evictionPriority: 2,
|
||||
pod: pidConsumingPod("fork-bomb-container-with-low-priority", 12000),
|
||||
pod: pidConsumingPod("fork-bomb-container-with-low-priority", processes),
|
||||
},
|
||||
{
|
||||
evictionPriority: 0,
|
||||
@@ -505,7 +506,7 @@ var _ = SIGDescribe("PriorityPidEvictionOrdering", framework.WithSlow(), framewo
|
||||
},
|
||||
{
|
||||
evictionPriority: 1,
|
||||
pod: pidConsumingPod("fork-bomb-container-with-high-priority", 12000),
|
||||
pod: pidConsumingPod("fork-bomb-container-with-high-priority", processes),
|
||||
},
|
||||
}
|
||||
specs[1].pod.Spec.PriorityClassName = highPriorityClassName
|
||||
@@ -524,7 +525,7 @@ var _ = SIGDescribe("PriorityPidEvictionOrdering", framework.WithSlow(), framewo
|
||||
specs := []podEvictSpec{
|
||||
{
|
||||
evictionPriority: 1,
|
||||
pod: pidConsumingPod("fork-bomb-container", 30000),
|
||||
pod: pidConsumingPod("fork-bomb-container", processes),
|
||||
wantPodDisruptionCondition: ptr.To(v1.DisruptionTarget),
|
||||
},
|
||||
}
|
||||
|
@@ -259,7 +259,7 @@ var _ = SIGDescribe("Summary API", framework.WithNodeConformance(), func() {
|
||||
"InodesUsed": bounded(0, 1e8),
|
||||
}),
|
||||
"ProcessStats": ptrMatchAllFields(gstruct.Fields{
|
||||
"ProcessCount": bounded(1, 1e8),
|
||||
"ProcessCount": bounded(0, 1e8),
|
||||
}),
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user