Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

zhiying-lin
Copy link
Contributor

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:

How has this code been tested

Special notes for your reviewer

Copy link

codecov bot commented Feb 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.77%. Comparing base (676efec) to head (07c62a5).

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.
📢 Have feedback on the report? Share it here.

@zhiying-lin zhiying-lin force-pushed the fix-timeout branch 2 times, most recently from e588fa4 to cbd2bfc Compare February 21, 2025 05:50
@@ -26,8 +26,9 @@ import (
)

const (
timeout = time.Second * 10
interval = time.Millisecond * 250
timeout = time.Second * 10
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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

Copy link
Contributor Author

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.

@zhiying-lin zhiying-lin force-pushed the fix-timeout branch 3 times, most recently from 86b561f to 3be5619 Compare February 26, 2025 09:11
@jwtty
Copy link
Contributor

jwtty commented Feb 26, 2025

lgtm, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants