-
Notifications
You must be signed in to change notification settings - Fork 62
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 TestPodSidecarLabelChangeTriggersAddIptablesAction flake #636
Conversation
Signed-off-by: Zhonghu Xu <[email protected]>
pkg/controller/bypass/bypass_test.go
Outdated
c := NewByPassController(client) | ||
go c.Run(stopCh) | ||
cache.WaitForCacheSync(stopCh, c.pod.HasSynced) |
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 is the root cause
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 am also fixing it. you can directly call c.Run(stopCh)
, just remove go
.
There is already cache.WaitForCacheSync(stopCh, c.pod.HasSynced) in c.Run
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.
Yes, here we can
Codecov ReportAll modified and coverable lines are covered by tests ✅
... and 3 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
i also found that the NODE_NAME env is not aligned with the one in the test pod's |
They should match. Weired, why the test passed |
Oh, it is because fake client does not support field selector, which actually works in kube-apiserver |
Signed-off-by: Zhonghu Xu <[email protected]>
ping @supercharge-xsy |
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
@hzxuzhonghu maybe this PR could be merged? |
@nlgwcy I thought it was merged |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Okabe-Rintarou-0, supercharge-xsy 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 bug
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: