Skip to content

Commit

Permalink
Merge pull request #16618 from tnozicka/fix-dc-controllerref-flake
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue.

Make DC extended ControllerRef test more resilient

Fixes: #16592
  • Loading branch information
openshift-merge-robot authored Oct 2, 2017
2 parents bd5b800 + 9ff78f7 commit 5295973
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/extended/deployments/deployments.go
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,8 @@ var _ = g.Describe("[Feature:DeploymentConfig] deploymentconfigs", func() {
g.By("should create ControllerRef in RCs it creates", func() {
dc, err = readDCFixture(simpleDeploymentFixture)
o.Expect(err).NotTo(o.HaveOccurred())
// Having more replicas will make us more resilient to pod failures
dc.Spec.Replicas = 3
dc, err = oc.AppsClient().Apps().DeploymentConfigs(namespace).Create(dc)
o.Expect(err).NotTo(o.HaveOccurred())

Expand Down Expand Up @@ -1061,7 +1063,7 @@ var _ = g.Describe("[Feature:DeploymentConfig] deploymentconfigs", func() {

dc, err = waitForDCModification(oc, namespace, dcName, deploymentChangeTimeout,
dc.GetResourceVersion(), func(config *deployapi.DeploymentConfig) (bool, error) {
return config.Status.AvailableReplicas != dc.Status.AvailableReplicas, nil
return config.Status.AvailableReplicas == 0, nil
})
o.Expect(err).NotTo(o.HaveOccurred())
o.Expect(dc.Status.AvailableReplicas).To(o.BeZero())
Expand All @@ -1081,7 +1083,7 @@ var _ = g.Describe("[Feature:DeploymentConfig] deploymentconfigs", func() {

dc, err = waitForDCModification(oc, namespace, dcName, deploymentChangeTimeout,
dc.GetResourceVersion(), func(config *deployapi.DeploymentConfig) (bool, error) {
return config.Status.AvailableReplicas != dc.Status.AvailableReplicas, nil
return config.Status.AvailableReplicas == dc.Spec.Replicas, nil
})
o.Expect(err).NotTo(o.HaveOccurred())
o.Expect(dc.Status.AvailableReplicas).To(o.Equal(dc.Spec.Replicas))
Expand Down

0 comments on commit 5295973

Please sign in to comment.