-
Notifications
You must be signed in to change notification settings - Fork 890
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 flake test of TestUpdateClusterEventHandler #5856
fix flake test of TestUpdateClusterEventHandler #5856
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #5856 +/- ##
==========================================
+ Coverage 46.31% 46.37% +0.06%
==========================================
Files 661 661
Lines 54364 54362 -2
==========================================
+ Hits 25177 25209 +32
+ Misses 27562 27533 -29
+ Partials 1625 1620 -5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
@XiShanYongYe-Chang: GitHub didn't allow me to request PR reviews from the following users: mohamedawnallah. Note that only karmada-io members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Thanks so much, @XiShanYongYe-Chang, for noticing that the I've submitted a follow-up PR in your repo to address the timeout issue. To validate the changes, I ran all test cases in the controller 100 times, clearing the cache between runs, and all tests passed. Note: |
Hi @mohamedawnallah, karmada/pkg/search/controller.go Lines 155 to 156 in 9416c08
I'm a little confused here, why do we need to wait? Let's look at it again. I'm guessing this wait time is probably the main reason, and I'm wondering how can we make sure it's enough? |
/hold |
Wait for XiShanYongYe-Chang#6 ? |
I think I found the reason, because we added |
Signed-off-by: changzhen <[email protected]>
4a94c11
to
7f7879d
Compare
/hold cancel |
@XiShanYongYe-Chang Thank you! 🙏 That’s definitely the reason behind the timeout issue. In the referenced PR XiShanYongYe-Chang#6, I updated the following:
These changes address error logs like:
|
Thanks @mohamedawnallah, let me add your commit. |
6ab05f8
to
63ed893
Compare
Signed-off-by: Mohamed Awnallah <[email protected]> Signed-off-by: changzhen <[email protected]>
63ed893
to
7da6423
Compare
/cc @RainbowMango |
/retest
|
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.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RainbowMango 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 |
What type of PR is this?
/kind failing-test
What this PR does / why we need it:
In the test,
fake.NewFakeClient()
andfakekarmadaclient.NewSimpleClientset()
are two different fake clients. In other test cases without errors,controlPlaneClient
is not really used because it is replaced byfakedynamic.NewSimpleDynamicClient
. In failed test case, however, it is used to create the cluster object, which should be the cause of the occasional error.Root cause: we added eventHandlers twice, which caused the test sequence to go wrong and kept on waiting for events.
The reason why we add the second commit: #5856 (comment)
Which issue(s) this PR fixes:
Fixes #5855
Special notes for your reviewer:
Does this PR introduce a user-facing change?: