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

Revert "Improved HPA e2e to test stability of the scale decision" #16274

Merged
merged 1 commit into from
Oct 26, 2015
Merged
Show file tree
Hide file tree
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
11 changes: 0 additions & 11 deletions test/e2e/autoscaling_utils.go
Expand Up @@ -231,17 +231,6 @@ func (rc *ResourceConsumer) WaitForReplicas(desiredReplicas int) {
Failf("timeout waiting %v for pods size to be %d", timeout, desiredReplicas)
}

func (rc *ResourceConsumer) EnsureDesiredReplicas(desiredReplicas int, timeout time.Duration) {
for start := time.Now(); time.Since(start) < timeout; time.Sleep(10 * time.Second) {
actual := rc.GetReplicas()
if desiredReplicas != actual {
Failf("Number of replicas has changed: expected %v, got %v", desiredReplicas, actual)
}
Logf("Number of replicas is as expected")
}
Logf("Number of replicas was stable over %v", timeout)
}

func (rc *ResourceConsumer) CleanUp() {
By(fmt.Sprintf("Removing consuming RC %s", rc.name))
rc.stopCPU <- 0
Expand Down
9 changes: 2 additions & 7 deletions test/e2e/horizontal_pod_autoscaling.go
Expand Up @@ -17,18 +17,15 @@ limitations under the License.
package e2e

import (
"time"

"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/apis/extensions"

. "github.com/onsi/ginkgo"
)

const (
kind = "replicationController"
subresource = "scale"
stabilityTimeout = 10 * time.Minute
kind = "replicationController"
subresource = "scale"
)

var _ = Describe("Horizontal pod autoscaling", func() {
Expand All @@ -41,7 +38,6 @@ var _ = Describe("Horizontal pod autoscaling", func() {
defer rc.CleanUp()
createCPUHorizontalPodAutoscaler(rc, 20)
rc.WaitForReplicas(3)
rc.EnsureDesiredReplicas(3, stabilityTimeout)
rc.ConsumeCPU(700)
rc.WaitForReplicas(5)
})
Expand All @@ -51,7 +47,6 @@ var _ = Describe("Horizontal pod autoscaling", func() {
defer rc.CleanUp()
createCPUHorizontalPodAutoscaler(rc, 30)
rc.WaitForReplicas(3)
rc.EnsureDesiredReplicas(3, stabilityTimeout)
rc.ConsumeCPU(100)
rc.WaitForReplicas(1)
})
Expand Down