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

This commit is contained in:
Beata Skiba 2018-07-23 14:11:11 +02:00
parent 4e0a60a44c
commit eb6f45905b

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()})