-
Notifications
You must be signed in to change notification settings - Fork 726
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
resource_manager: Fix for delayed deletion of created groups in TestWatchResourceGroup #7154
Conversation
Signed-off-by: husharp <[email protected]>
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
I have 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.
The reset LGTM.
re := suite.Require() | ||
cli := suite.client | ||
group := &rmpb.ResourceGroup{ | ||
Name: "test", | ||
Name: "watch_test", |
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.
What about using a const?
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.
done
@@ -1265,14 +1288,14 @@ func (suite *resourceManagerClientTestSuite) TestCheckBackgroundJobs() { | |||
return false | |||
}, testutil.WithTickInterval(50*time.Millisecond)) | |||
|
|||
resourceGroupName = suite.initGroups[0].Name | |||
resourceGroupName = "background_unable" |
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.
Ditto.
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.
use a func to distinguish
d6975f0
to
a54203d
Compare
Signed-off-by: husharp <[email protected]>
a54203d
to
33382d8
Compare
Codecov Report
@@ Coverage Diff @@
## master #7154 +/- ##
==========================================
+ Coverage 74.26% 74.34% +0.07%
==========================================
Files 441 441
Lines 47216 47217 +1
==========================================
+ Hits 35064 35102 +38
+ Misses 9063 9015 -48
- Partials 3089 3100 +11
Flags with carried forward coverage won't be shown. Click here to find out more. |
@@ -129,20 +129,6 @@ func (suite *resourceManagerClientTestSuite) SetupSuite() { | |||
}, | |||
}, | |||
}, | |||
{ |
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.
why remove this case?
enableBackgroundGroup := func(enable bool) string { | ||
if enable { | ||
return "background_enable" | ||
} else { | ||
return "background_unable" | ||
} | ||
} |
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.
used enableBackgroundGroup
instead of unnecessary using initGroups
cc @nolouch
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
/merge |
@nolouch: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
This pull request has been accepted and is ready to merge. Commit hash: 33382d8
|
…atchResourceGroup (tikv#7154) close tikv#7144 Signed-off-by: husharp <[email protected]>
What problem does this PR solve?
Issue Number: Close #7144
What is changed and how does it work?
cleanupResourceGroups
will be executed. However, the watch mechanism in ci is not immediately available due to machine performance.For
TestWatchResourceGroups
that have groups created at begin, deletions (the delayed deletions mentioned above which result from last Test finished) may be encountered after creation, causing creation to not work.Check List
Tests
Release note