-
Notifications
You must be signed in to change notification settings - Fork 194
Attempt at fixing flakey tests #4700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
deccbff
37bacd3
7543a0a
cf97afa
b8451e7
01d2b1c
4332e70
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -446,8 +446,11 @@ var _ = Describe("ARO Operator - MUO Deployment", func() { | |||||||||||
| DeleteK8sObjectWithRetry(ctx, deleteFunc, managedUpgradeOperatorDeployment, metav1.DeleteOptions{}) | ||||||||||||
|
|
||||||||||||
| By("waiting for the MUO deployment to be reconciled") | ||||||||||||
| GetK8sObjectWithRetry(ctx, getFunc, managedUpgradeOperatorDeployment, metav1.GetOptions{}) | ||||||||||||
| }, SpecTimeout(2*time.Minute)) | ||||||||||||
| Eventually(func(g Gomega, ctx context.Context) { | ||||||||||||
| _, err := getFunc(ctx, managedUpgradeOperatorDeployment, metav1.GetOptions{}) | ||||||||||||
| g.Expect(err).NotTo(HaveOccurred()) | ||||||||||||
| }).WithContext(ctx).WithTimeout(DefaultEventuallyTimeout).Should(Succeed()) | ||||||||||||
| }) | ||||||||||||
|
Comment on lines
448
to
+453
|
||||||||||||
| }) | ||||||||||||
|
|
||||||||||||
| var _ = Describe("ARO Operator - ImageConfig Reconciler", func() { | ||||||||||||
|
|
@@ -749,7 +752,10 @@ var _ = Describe("ARO Operator - Guardrails", func() { | |||||||||||
| DeleteK8sObjectWithRetry(ctx, deleteFunc, gkControllerManagerDeployment, metav1.DeleteOptions{}) | ||||||||||||
|
|
||||||||||||
| By("waiting for the gatekeeper Controller Manager deployment to be reconciled") | ||||||||||||
| GetK8sObjectWithRetry(ctx, getFunc, gkControllerManagerDeployment, metav1.GetOptions{}) | ||||||||||||
| Eventually(func(g Gomega, ctx context.Context) { | ||||||||||||
| _, err := getFunc(ctx, gkControllerManagerDeployment, metav1.GetOptions{}) | ||||||||||||
| g.Expect(err).NotTo(HaveOccurred()) | ||||||||||||
| }).WithContext(ctx).WithTimeout(DefaultEventuallyTimeout).Should(Succeed()) | ||||||||||||
|
Comment on lines
+755
to
+758
|
||||||||||||
| }) | ||||||||||||
|
|
||||||||||||
| It("Audit must be restored if deleted", func(ctx context.Context) { | ||||||||||||
|
|
@@ -771,7 +777,10 @@ var _ = Describe("ARO Operator - Guardrails", func() { | |||||||||||
| DeleteK8sObjectWithRetry(ctx, deleteFunc, gkAuditDeployment, metav1.DeleteOptions{}) | ||||||||||||
|
|
||||||||||||
| By("waiting for the gatekeeper Audit deployment to be reconciled") | ||||||||||||
| GetK8sObjectWithRetry(ctx, getFunc, gkAuditDeployment, metav1.GetOptions{}) | ||||||||||||
| Eventually(func(g Gomega, ctx context.Context) { | ||||||||||||
| _, err := getFunc(ctx, gkAuditDeployment, metav1.GetOptions{}) | ||||||||||||
| g.Expect(err).NotTo(HaveOccurred()) | ||||||||||||
| }).WithContext(ctx).WithTimeout(DefaultEventuallyTimeout).Should(Succeed()) | ||||||||||||
|
Comment on lines
+780
to
+783
|
||||||||||||
| Eventually(func(g Gomega, ctx context.Context) { | |
| _, err := getFunc(ctx, gkAuditDeployment, metav1.GetOptions{}) | |
| g.Expect(err).NotTo(HaveOccurred()) | |
| }).WithContext(ctx).WithTimeout(DefaultEventuallyTimeout).Should(Succeed()) | |
| GetK8sObjectWithRetry(ctx, getFunc, gkAuditDeployment, metav1.GetOptions{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This
Eventuallyblock duplicates the existingGetK8sObjectWithRetryhelper (used throughout this file) and also changes retry semantics (helper usesDefaultTimeoutandPollingInterval, while this usesDefaultEventuallyTimeoutand the suite’s default polling interval). To keep retries/timeouts consistent across the e2e suite and avoid future tuning in multiple places, prefer using the shared helper here (or explicitly match its timeout/polling settings).