Unverified Commit b0ff44bf authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #55198 from yanxuean/unuse-if

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. delete if-else branch Signed-off-by: 's avataryanxuean <yan.xuean@zte.com.cn> **What this PR does / why we need it**: The if-else branch is redundant. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
parents dd70d3c2 00eb0439
......@@ -150,11 +150,7 @@ func rmSetup(t *testing.T, stopCh chan struct{}) (*httptest.Server, framework.Cl
func waitToObservePods(t *testing.T, podInformer cache.SharedIndexInformer, podNum int) {
if err := wait.Poll(pollInterval, pollTimeout, func() (bool, error) {
objects := podInformer.GetIndexer().List()
if len(objects) == podNum {
return true, nil
} else {
return false, nil
}
return len(objects) == podNum, nil
}); err != nil {
t.Fatal(err)
}
......@@ -275,11 +271,7 @@ func waitRCStable(t *testing.T, clientSet clientset.Interface, rc *v1.Replicatio
if err != nil {
return false, err
}
if updatedRC.Status.Replicas != *rc.Spec.Replicas {
return false, nil
} else {
return true, nil
}
return updatedRC.Status.Replicas == *rc.Spec.Replicas, nil
}); err != nil {
t.Fatal(err)
}
......
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