Skip to content

Commit

Permalink
improve waiting for statefulset
Browse files Browse the repository at this point in the history
  • Loading branch information
Pothulapati committed Oct 10, 2023
1 parent 74cd0c1 commit 2138acb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion e2e/dragonfly_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ var _ = Describe("Dragonfly Lifecycle tests", Ordered, FlakeAttempts(3), func()
Expect(err).To(BeNil())
time.Sleep(30 * time.Second)

// Wait until Dragonfly object is marked resources-created
// Wait until Dragonfly object is marked ready
err = waitForDragonflyPhase(ctx, k8sClient, name, namespace, controller.PhaseReady, 3*time.Minute)
Expect(err).To(BeNil())
err = waitForStatefulSetReady(ctx, k8sClient, name, namespace, 3*time.Minute)
Expand Down
2 changes: 1 addition & 1 deletion e2e/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func isStatefulSetReady(ctx context.Context, c client.Client, name, namespace st
return false, nil
}

if statefulSet.Status.ReadyReplicas == *statefulSet.Spec.Replicas {
if statefulSet.Status.ReadyReplicas == *statefulSet.Spec.Replicas && statefulSet.Status.CurrentRevision == statefulSet.Status.UpdateRevision {
return true, nil
}

Expand Down

0 comments on commit 2138acb

Please sign in to comment.