Commit 1fab123e authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #40864 from kargakis/lack-of-progress

Automatic merge from submit-queue (batch tested with PRs 40864, 40666, 38382, 40874) test: reduce deployment progress deadline, ensure its rs is up Fixes https://github.com/kubernetes/kubernetes/issues/39785 by reducing the deadline of the expected progress and making sure the new replica set is up before checking the deployment condition. @kubernetes/sig-apps-misc
parents 52d31b99 5e61e5fc
...@@ -1217,16 +1217,16 @@ func testFailedDeployment(f *framework.Framework) { ...@@ -1217,16 +1217,16 @@ func testFailedDeployment(f *framework.Framework) {
// Create a nginx deployment. // Create a nginx deployment.
deploymentName := "nginx" deploymentName := "nginx"
nonExistentImage := "nginx:not-there" nonExistentImage := "nginx:not-there"
thirty := int32(30) ten := int32(10)
d := framework.NewDeployment(deploymentName, replicas, podLabels, nginxImageName, nonExistentImage, extensions.RecreateDeploymentStrategyType) d := framework.NewDeployment(deploymentName, replicas, podLabels, nginxImageName, nonExistentImage, extensions.RecreateDeploymentStrategyType)
d.Spec.ProgressDeadlineSeconds = &thirty d.Spec.ProgressDeadlineSeconds = &ten
framework.Logf("Creating deployment %q with progressDeadlineSeconds set to %ds and a non-existent image", deploymentName, thirty) framework.Logf("Creating deployment %q with progressDeadlineSeconds set to %ds and a non-existent image", deploymentName, ten)
deployment, err := c.Extensions().Deployments(ns).Create(d) deployment, err := c.Extensions().Deployments(ns).Create(d)
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
framework.Logf("Waiting for deployment %q to be observed by the controller", deploymentName) framework.Logf("Waiting for deployment %q new replica set to come up", deploymentName)
Expect(framework.WaitForObservedDeployment(c, ns, deploymentName, deployment.Generation)).NotTo(HaveOccurred()) Expect(framework.WaitForDeploymentUpdatedReplicasLTE(c, ns, deploymentName, 1, deployment.Generation))
framework.Logf("Checking deployment %q for a timeout condition", deploymentName) framework.Logf("Checking deployment %q for a timeout condition", deploymentName)
Expect(framework.WaitForDeploymentWithCondition(c, ns, deploymentName, deploymentutil.TimedOutReason, extensions.DeploymentProgressing)).NotTo(HaveOccurred()) Expect(framework.WaitForDeploymentWithCondition(c, ns, deploymentName, deploymentutil.TimedOutReason, extensions.DeploymentProgressing)).NotTo(HaveOccurred())
...@@ -1237,8 +1237,8 @@ func testFailedDeployment(f *framework.Framework) { ...@@ -1237,8 +1237,8 @@ func testFailedDeployment(f *framework.Framework) {
}) })
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
framework.Logf("Waiting for deployment %q to be observed by the controller", deploymentName) framework.Logf("Waiting for deployment %q new replica set to come up", deploymentName)
Expect(framework.WaitForObservedDeployment(c, ns, deploymentName, deployment.Generation)).NotTo(HaveOccurred()) Expect(framework.WaitForDeploymentUpdatedReplicasLTE(c, ns, deploymentName, 1, deployment.Generation))
framework.Logf("Waiting for deployment %q status", deploymentName) framework.Logf("Waiting for deployment %q status", deploymentName)
Expect(framework.WaitForDeploymentStatusValid(c, deployment)).NotTo(HaveOccurred()) Expect(framework.WaitForDeploymentStatusValid(c, deployment)).NotTo(HaveOccurred())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment