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

🌱 add unit test for resmanager #111

Merged
merged 1 commit into from
Apr 29, 2022
Merged

🌱 add unit test for resmanager #111

merged 1 commit into from
Apr 29, 2022

Conversation

jasonliu747
Copy link
Member

@jasonliu747 jasonliu747 commented Apr 29, 2022

Ⅰ. Describe what this PR does

Add unit test for resmanager.go in koordlet

Ⅱ. Does this pull request fix one issue?

#69

Ⅲ. Describe how to verify it

all checks in action passed

Ⅳ. Special notes for reviews

None

@jasonliu747
Copy link
Member Author

jasonliu747 commented Apr 29, 2022

}

spec := nodeSLO.Spec
switch feature {
case features.BECPUSuppress, features.BEMemoryEvict:
// nil value means enabled
if spec.ResourceUsedThresholdWithBE == nil {
return false, fmt.Errorf("cannot parse feature config for invalid nodeSLO %v", nodeSLO)
if spec.ResourceUsedThresholdWithBE == nil || spec.ResourceUsedThresholdWithBE.Enable == nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these change the default setting of BECPUSuppress & BEMemoryEvict but i think it's acceptable. WDYT @zwzhang0107

Signed-off-by: Jason Liu <jasonliu747@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Apr 29, 2022

Codecov Report

Merging #111 (18b1f65) into main (dd30303) will increase coverage by 1.53%.
The diff coverage is 57.14%.

@@            Coverage Diff             @@
##             main     #111      +/-   ##
==========================================
+ Coverage   49.82%   51.35%   +1.53%     
==========================================
  Files          77       77              
  Lines        7248     7275      +27     
==========================================
+ Hits         3611     3736     +125     
+ Misses       3309     3207     -102     
- Partials      328      332       +4     
Flag Coverage Δ
unittests 51.35% <57.14%> (+1.53%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/util/config.go 0.00% <0.00%> (ø)
pkg/util/system/resctrl.go 42.69% <0.00%> (ø)
pkg/koordlet/resmanager/resmanager.go 54.50% <100.00%> (+51.75%) ⬆️
pkg/koordlet/resmanager/strategy_util.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dd30303...18b1f65. Read the comment docs.

@eahydra
Copy link
Member

eahydra commented Apr 29, 2022

/lgtm

@hormes
Copy link
Member

hormes commented Apr 29, 2022

/approve

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hormes

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@koordinator-bot koordinator-bot bot merged commit 428e2d4 into koordinator-sh:main Apr 29, 2022
@jasonliu747 jasonliu747 deleted the ut branch May 5, 2022 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants