-
Notifications
You must be signed in to change notification settings - Fork 18
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
Fix flaky event recording config-policy-controller E2E test #174
Fix flaky event recording config-policy-controller E2E test #174
Conversation
f806ab7
to
2d6a84e
Compare
test/e2e/case15_event_format_test.go
Outdated
Eventually(func() []v1.Event { | ||
return utils.GetMatchingEvents(clientManaged, testNamespace, | ||
case15AlwaysCompliantName, "", "Policy status is NonCompliant", defaultTimeoutSeconds) | ||
}, defaultTimeoutSeconds, 1).Should(BeEmpty()) |
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.
(Optional) Do we want this to be Consistently()
? If not, I don't think it needs to be wrapped in Eventually()
since it's checking whether it's empty.
e508299
to
32b3fa7
Compare
@@ -482,7 +482,7 @@ var _ = Describe("Test templatization", Ordered, func() { | |||
case13PruneTmpErr+"-configmap", "default", true, defaultTimeoutSeconds) | |||
|
|||
return configmap | |||
}, defaultTimeoutSeconds, 1).ShouldNot(BeNil()) |
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.
consistently timeout
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.
What do you mean?
I think this change is good - we don't need to check that the configmap is still there for 60 (or more) seconds, 30 should be fine. But I don't understand why it would be timing out right now?
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.
It doesn't any issue but I tried to reduce e2e test time. I think 60 secs is meaningless. Just suggestion. It took over 20mins before but now less than 15 mins
@@ -219,7 +219,7 @@ var _ = Describe("Test Object deletion", Ordered, func() { | |||
case20PodName, "default", true, defaultTimeoutSeconds) | |||
|
|||
return pod | |||
}, defaultTimeoutSeconds, 1).Should(Not(BeNil())) | |||
}, 30, 1).Should(Not(BeNil())) |
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.
consistently timeout
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.
10-12 mins now
test/e2e/e2e_suite_test.go
Outdated
@@ -106,7 +106,7 @@ var _ = BeforeSuite(func() { | |||
clientManagedDynamic = NewKubeClientDynamic("", kubeconfigManaged, "") | |||
defaultImageRegistry = "quay.io/open-cluster-management" | |||
testNamespace = "managed" | |||
defaultTimeoutSeconds = 60 | |||
defaultTimeoutSeconds = 100 |
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.
Increase this timeout because minimum version is slow
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.
@yiraeChristineKim is it only specific tests that fail without this increased default timeout?
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.
Now 60 sec works fine
@@ -482,7 +482,7 @@ var _ = Describe("Test templatization", Ordered, func() { | |||
case13PruneTmpErr+"-configmap", "default", true, defaultTimeoutSeconds) | |||
|
|||
return configmap | |||
}, defaultTimeoutSeconds, 1).ShouldNot(BeNil()) |
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.
What do you mean?
I think this change is good - we don't need to check that the configmap is still there for 60 (or more) seconds, 30 should be fine. But I don't understand why it would be timing out right now?
Signed-off-by: Yi Rae Kim <yikim@redhat.com>
38ddc71
to
17a00f0
Compare
gvrPolicy schema.GroupVersionResource | ||
testNamespace string | ||
defaultTimeoutSeconds int | ||
defaultConsistentlyDuration int |
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.
I added this only
@@ -21,7 +21,7 @@ const ( | |||
case5ComboYaml string = "../resources/case5_multi/case5_multi_combo.yaml" | |||
) | |||
|
|||
var _ = Describe("Test multiple obj template handling", func() { | |||
var _ = Describe("Test multiple obj template handling", Ordered, func() { |
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 caused minimum version issue
17a00f0
to
435a1b7
Compare
Signed-off-by: Yi Rae Kim <yikim@redhat.com>
435a1b7
to
492f449
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JustinKuli, yiraeChristineKim The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@@ -73,7 +73,7 @@ var _ = Describe("Test an objectDefinition with an invalid field", Ordered, func | |||
} | |||
|
|||
return startTime.After(compPlcEvents[len(compPlcEvents)-1].LastTimestamp.Time) | |||
}, defaultTimeoutSeconds, 1).Should(BeTrue()) | |||
}, 30, 1).Should(BeTrue()) |
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.
@yiraeChristineKim did you forget to update this value and the other value in this file to use the new global variable?
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.
I think I missed these 2 Thanks Let me open pr
Ref: https://issues.redhat.com/browse/ACM-7938