mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
Handles clean up errors
This commit is contained in:
parent
80fbc4c319
commit
ec89154276
@ -1008,7 +1008,7 @@ var _ = SIGDescribe("Cluster size autoscaling", framework.WithSlow(), func() {
|
||||
replicaCount := 2 * nodeCount
|
||||
reservedMemory := int(float64(replicaCount) * float64(0.7) * float64(memAllocatableMb))
|
||||
cleanupFunc := ReserveMemoryWithSchedulerName(ctx, f, "memory-reservation", replicaCount, reservedMemory, false, 1, nonExistingBypassedSchedulerName)
|
||||
defer cleanupFunc()
|
||||
defer framework.ExpectNoError(cleanupFunc())
|
||||
// Verify that cluster size is increased
|
||||
ginkgo.By("Waiting for cluster scale-up")
|
||||
sizeFunc := func(size int) bool {
|
||||
@ -1022,7 +1022,7 @@ var _ = SIGDescribe("Cluster size autoscaling", framework.WithSlow(), func() {
|
||||
replicaCount := 1
|
||||
reservedMemory := int(float64(0.5) * float64(memAllocatableMb))
|
||||
cleanupFunc := ReserveMemoryWithSchedulerName(ctx, f, "memory-reservation", replicaCount, reservedMemory, false, 1, nonExistingBypassedSchedulerName)
|
||||
defer cleanupFunc()
|
||||
defer framework.ExpectNoError(cleanupFunc())
|
||||
// Verify that cluster size is the same
|
||||
ginkgo.By(fmt.Sprintf("Waiting for scale up hoping it won't happen, polling cluster size for %s", scaleUpTimeout.String()))
|
||||
sizeFunc := func(size int) bool {
|
||||
@ -1038,7 +1038,7 @@ var _ = SIGDescribe("Cluster size autoscaling", framework.WithSlow(), func() {
|
||||
reservedMemory := int(float64(replicaCount) * float64(0.7) * float64(memAllocatableMb))
|
||||
schedulerName := "non-existent-scheduler-" + f.UniqueName
|
||||
cleanupFunc := ReserveMemoryWithSchedulerName(ctx, f, "memory-reservation", replicaCount, reservedMemory, false, 1, schedulerName)
|
||||
defer cleanupFunc()
|
||||
defer framework.ExpectNoError(cleanupFunc())
|
||||
// Verify that cluster size is the same
|
||||
ginkgo.By(fmt.Sprintf("Waiting for scale up hoping it won't happen, polling cluster size for %s", scaleUpTimeout.String()))
|
||||
sizeFunc := func(size int) bool {
|
||||
|
Loading…
Reference in New Issue
Block a user