Skip to content

Commit

Permalink
Merge pull request karmada-io#5258 from chaosi-zju/e2e-3
Browse files Browse the repository at this point in the history
flake test: daemonSet status collection testing failed
  • Loading branch information
karmada-bot authored Aug 13, 2024
2 parents 8526486 + 10f118d commit 223e54e
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions test/e2e/resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,12 +453,10 @@ var _ = ginkgo.Describe("[resource-status collection] resource status collection
currentDaemonSet, err := kubeClient.AppsV1().DaemonSets(daemonSetNamespace).Get(context.TODO(), daemonSetName, metav1.GetOptions{})
g.Expect(err).ShouldNot(gomega.HaveOccurred())

klog.Infof("daemonSet(%s/%s) replicas: %d, wanted replicas: %d", daemonSetNamespace, daemonSetName, currentDaemonSet.Status.NumberReady, wantedReplicas)
if currentDaemonSet.Status.NumberReady == wantedReplicas &&
currentDaemonSet.Status.CurrentNumberScheduled == wantedReplicas &&
klog.Infof("daemonSet(%s/%s) current scheduled replicas: %d, wanted replicas: %d", daemonSetNamespace, daemonSetName, currentDaemonSet.Status.CurrentNumberScheduled, wantedReplicas)
if currentDaemonSet.Status.CurrentNumberScheduled == wantedReplicas &&
currentDaemonSet.Status.DesiredNumberScheduled == wantedReplicas &&
currentDaemonSet.Status.UpdatedNumberScheduled == wantedReplicas &&
currentDaemonSet.Status.NumberAvailable == wantedReplicas {
currentDaemonSet.Status.UpdatedNumberScheduled == wantedReplicas {
return true, nil
}

Expand All @@ -476,11 +474,9 @@ var _ = ginkgo.Describe("[resource-status collection] resource status collection
currentDaemonSet, err := kubeClient.AppsV1().DaemonSets(daemonSetNamespace).Get(context.TODO(), daemonSetName, metav1.GetOptions{})
g.Expect(err).ShouldNot(gomega.HaveOccurred())

if currentDaemonSet.Status.NumberReady == wantedReplicas &&
currentDaemonSet.Status.CurrentNumberScheduled == wantedReplicas &&
if currentDaemonSet.Status.CurrentNumberScheduled == wantedReplicas &&
currentDaemonSet.Status.DesiredNumberScheduled == wantedReplicas &&
currentDaemonSet.Status.UpdatedNumberScheduled == wantedReplicas &&
currentDaemonSet.Status.NumberAvailable == wantedReplicas {
currentDaemonSet.Status.UpdatedNumberScheduled == wantedReplicas {
return true, nil
}

Expand Down

0 comments on commit 223e54e

Please sign in to comment.