-
Notifications
You must be signed in to change notification settings - Fork 13
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
test: fix the timeout for tests #267
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #267 +/- ##
==========================================
+ Coverage 79.60% 79.77% +0.17%
==========================================
Files 28 28
Lines 3976 3976
==========================================
+ Hits 3165 3172 +7
+ Misses 650 643 -7
Partials 161 161 ☔ View full report in Codecov by Sentry. |
e588fa4
to
cbd2bfc
Compare
@@ -26,8 +26,9 @@ import ( | |||
) | |||
|
|||
const ( | |||
timeout = time.Second * 10 | |||
interval = time.Millisecond * 250 | |||
timeout = time.Second * 10 |
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.
can we define a common base line 10 second timeout for all tests instead of each have its own?
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.
do you mean creating a common variable somewhere and use that for all the controllers?
it's doable, but the timeout may not be necessarily the same and depends on the tests & implementations.
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 seems that the below is good for all tests in this repo
defaultTimeout = time.Second * 10
lightAzureOperationTimeout = 1 * time.Minute
heavyAzureOperationTimeout = 10 * time.Minute
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.
Are you suggesting to create a common timeout for all e2e tests?
These timeout may not be applied to integration tests, cause in the integration test, we use the fake arm call.
pkg/controllers/hub/trafficmanagerbackend/controller_integration_test.go
Show resolved
Hide resolved
86b561f
to
3be5619
Compare
3be5619
to
07c62a5
Compare
lgtm, thanks. |
What type of PR is this?
/kind test
What this PR does / why we need it:
Use separate timeout for it and e2e tests
Which issue(s) this PR fixes:
Fixes #
Requirements:
make reviewable
for basic local testHow has this code been tested
Special notes for your reviewer