Merge pull request #66500 from bskiba/fix-e2e-regional

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix computing number of nodes to break in CA e2e unhealthy cluster test.

**What this PR does / why we need it**:
Fixes computing number of nodes to break in the e2e for Cluster Autoscaler acting on an unhealthy cluster.

**Release note**:
```
NONE
```

@MaciekPytel
This commit is contained in:
Kubernetes Submit Queue 2018-07-23 07:59:02 -07:00 committed by GitHub
commit 444e8ec267
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -899,7 +899,7 @@ var _ = SIGDescribe("Cluster size autoscaling [Slow]", func() {
}
By("Block network connectivity to some nodes to simulate unhealthy cluster")
nodesToBreakCount := int(math.Floor(math.Max(float64(unhealthyClusterThreshold), 0.5*float64(clusterSize))))
nodesToBreakCount := int(math.Ceil(math.Max(float64(unhealthyClusterThreshold), 0.5*float64(clusterSize))))
nodes, err := f.ClientSet.CoreV1().Nodes().List(metav1.ListOptions{FieldSelector: fields.Set{
"spec.unschedulable": "false",
}.AsSelector().String()})