-
-
Notifications
You must be signed in to change notification settings - Fork 861
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
Use the cached client for the controller tests #2501
Use the cached client for the controller tests #2501
Conversation
@@ -38,7 +38,7 @@ import ( | |||
|
|||
var ( | |||
fakeProvider *fake.Client | |||
timeout = time.Second * 10 | |||
timeout = time.Second * 20 |
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.
Seems like some of the tests take more than 10 seconds if we use the cached client 😢
Signed-off-by: shuheiktgw <s-kitagawa@mercari.com>
834a206
to
8cec658
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@@ -45,7 +45,7 @@ var ( | |||
fakeProvider *fake.Client | |||
metric dto.Metric | |||
metricDuration dto.Metric | |||
timeout = time.Second * 10 | |||
timeout = time.Second * 20 |
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.
The same with the PushSecret, and it seems some tests take more than 10 seconds...
We've used the cached client in the past and ran into the issue that you get unpredictable results in tests which is hard to work with (hence the timeout increase 😃). WRT:
external-secrets/pkg/controllers/externalsecret/suite_test.go Lines 82 to 89 in e5f953b
|
Hmm, I see. That makes sense! Thank you and I'm closing the PR 🙂 |
Problem Statement
SSIA. It would be better if we use the cached client instead of the uncached one (k8sClient) for the controller tests since that is what we use in the actual environment. Thanks!
Related Issue
N/A
Proposed Changes
Use the cached client instead.
Checklist
git commit --signoff
make test
make reviewable