-
Notifications
You must be signed in to change notification settings - Fork 239
chore: fix a flaky test #9699
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: main
Are you sure you want to change the base?
chore: fix a flaky test #9699
Conversation
Auto Cherry-pick Instructions
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9699 +/- ##
==========================================
+ Coverage 59.68% 59.70% +0.02%
==========================================
Files 551 551
Lines 59782 59788 +6
==========================================
+ Hits 35679 35697 +18
+ Misses 20844 20835 -9
+ Partials 3259 3256 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
pkg/testutil/apps/common_util.go
Outdated
if pobj.GetDeletionTimestamp().IsZero() { | ||
d, _ := json.Marshal(pobj) | ||
panic("expected DeletionTimestamp is not nil, obj: " + string(d)) | ||
ginkgo.GinkgoWriter.Printf("Warning: deleted obj's DeletionTimestamp is nil. This may due to an old reconciliation process is not done. obj: %s", string(d)) |
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.
If we remove the panic, nobody will notice or care about the warning. Cases may fail due to the residual resources, which are also flaky and hard to debug.
@leon-inf what's your opinion
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.
+1, we shouldn't simply remove the panic here. Regarding the specific issue, we should add a mechanism to coordinate the timing of deleting the component and its sub-resources.
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 can try delete Component object without removing the finalizer, so that we can make sure no component's reconciliation is still in progress.
This reverts commit b14b436.
587b223
to
6463d11
Compare
fixes #9448