PD e2e test: Ready node check now uses the most up-to-date node count.

This commit is contained in:
Cheng Xing 2017-06-01 14:03:02 -07:00
parent 43dcf0f56c
commit 6a073374f8

View File

@ -43,7 +43,7 @@ import (
const (
gcePDDetachTimeout = 10 * time.Minute
gcePDDetachPollTime = 10 * time.Second
nodeStatusTimeout = 3 * time.Minute
nodeStatusTimeout = 5 * time.Minute
nodeStatusPollTime = 1 * time.Second
maxReadRetry = 3
)
@ -429,6 +429,7 @@ var _ = framework.KubeDescribe("Pod Disks", func() {
podClient.Delete(host0Pod.Name, metav1.NewDeleteOptions(0))
detachAndDeletePDs(diskName, []types.NodeName{host0Name})
framework.WaitForNodeToBeReady(f.ClientSet, string(host0Name), nodeStatusTimeout)
nodes = framework.GetReadySchedulableNodesOrDie(f.ClientSet)
Expect(len(nodes.Items)).To(Equal(initialGroupSize))
}()
@ -488,6 +489,7 @@ var _ = framework.KubeDescribe("Pod Disks", func() {
framework.ExpectNoError(err, "Unable to re-create the deleted node")
framework.ExpectNoError(framework.WaitForGroupSize(framework.TestContext.CloudConfig.NodeInstanceGroup, int32(initialGroupSize)), "Unable to get the node group back to the original size")
framework.WaitForNodeToBeReady(f.ClientSet, nodeToDelete.Name, nodeStatusTimeout)
nodes = framework.GetReadySchedulableNodesOrDie(f.ClientSet)
if len(nodes.Items) != originalCount {
return fmt.Errorf("The node count is not back to original count")
}