Change:
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite} Happened on a presubmit run in . Previous issues for this test:
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite} Happened on a presubmit run in .
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite} Happened on a presubmit run in .
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite} Happened on a presubmit run in .
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}
https://k8s- Failed: [] Deployment scaled rollout deployment should not block on annotation check {Kubernetes e2e suite}

Discussion:
Expect(err).NotTo(HaveOccurred()) firstCond := client.ReplicaSetHasDesiredReplicas(c.Extensions(), first) <del> wait.PollImmediate(10*time.Millisecond, 1*time.Minute, firstCond) </del> <ins> err = wait.PollImmediate(10*time.Millisecond, 1*time.Minute, firstCond) Expect(err).NotTo(HaveOccurred()) </ins> secondCond := client.ReplicaSetHasDesiredReplicas(c.Extensions(), second) <del> wait.PollImmediate(10*time.Millisecond, 1*time.Minute, secondCond) </del> <ins> err = wait.PollImmediate(10*time.Millisecond, 1*time.Minute, secondCond) Expect(err).NotTo(HaveOccurred()) </ins> By(fmt.Sprintf("Updating the size (up) and template at the same time for deployment %q", deploymentName)) newReplicas := int32(20)

Expect(err).NotTo(HaveOccurred()) oldCond := client.ReplicaSetHasDesiredReplicas(c.Extensions(), oldRs) <del> wait.PollImmediate(10*time.Millisecond, 1*time.Minute, oldCond) </del> <ins> err = wait.PollImmediate(10*time.Millisecond, 1*time.Minute, oldCond) Expect(err).NotTo(HaveOccurred()) </ins> newCond := client.ReplicaSetHasDesiredReplicas(c.Extensions(), newRs) <del> wait.PollImmediate(10*time.Millisecond, 1*time.Minute, newCond) </del> <ins> err = wait.PollImmediate(10*time.Millisecond, 1*time.Minute, newCond) Expect(err).NotTo(HaveOccurred()) </ins> By(fmt.Sprintf("Updating the size (down) and template at the same time for deployment %q", deploymentName)) newReplicas = int32(5)

Logf(reason) return false, nil } <del> return true, nil </del> <ins> // When the deployment status and its underlying resources reach the desired state, we're done if deployment.Status.Replicas == deployment.Spec.Replicas && deployment.Status.UpdatedReplicas == deployment.Spec.Replicas && deployment.Status.AvailableReplicas == deployment.Spec.Replicas { return true, nil } reason = fmt.Sprintf("deployment status: %#v", deployment.Status) Logf(reason) return false, nil </ins> }) if err == wait.ErrWaitTimeout {

// When the deployment status and its underlying resources reach the desired state, we're done if deployment.Status.Replicas == deployment.Spec.Replicas && <del> deployment.Status.UpdatedReplicas == deployment.Spec.Replicas && deploymentutil.GetReplicaCountForReplicaSets(oldRSs) == 0 && deploymentutil.GetReplicaCountForReplicaSets([]*extensions.ReplicaSet{newRS}) == deployment.Spec.Replicas { </del> <ins> deployment.Status.UpdatedReplicas == deployment.Spec.Replicas { </ins> return true, nil } return false, nil