Skip to content

[YUNIKORN-869] Improve coverage of node_collection.go#405

Closed
0yukali0 wants to merge 18 commits into
apache:masterfrom
0yukali0:YUNIKORN-869
Closed

[YUNIKORN-869] Improve coverage of node_collection.go#405
0yukali0 wants to merge 18 commits into
apache:masterfrom
0yukali0:YUNIKORN-869

Conversation

@0yukali0
Copy link
Copy Markdown
Contributor

@0yukali0 0yukali0 commented Apr 13, 2022

What is this PR for?

Add some case to cover these functions

  1. GetIterator
  2. GetNodeSortingPolicy
  3. SetSodeSortingPolicy

What type of PR is it?

  • - Bug Fix
  • - Improvement
  • - Feature
  • - Documentation
  • - Hot Fix
  • - Refactoring

Todos

  • - Task

What is the Jira issue?

https://issues.apache.org/jira/browse/YUNIKORN-869

How should this be tested?

Use "make test" command in yonikorn repo and then use "go tool cover --func=coverage.txt" to check the result

Screenshots (if appropriate)

截圖 2022-04-13 下午7 28 29

### Questions: * [ ] - The licenses files need update. * [ ] - There is breaking changes for older versions. * [ ] - It needs documentation.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 13, 2022

Codecov Report

Merging #405 (92e3141) into master (053a269) will increase coverage by 0.19%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #405      +/-   ##
==========================================
+ Coverage   69.08%   69.28%   +0.19%     
==========================================
  Files          67       68       +1     
  Lines        9647     9803     +156     
==========================================
+ Hits         6665     6792     +127     
- Misses       2738     2769      +31     
+ Partials      244      242       -2     
Impacted Files Coverage Δ
pkg/scheduler/objects/application.go 56.83% <0.00%> (-2.30%) ⬇️
pkg/common/utils.go 80.00% <0.00%> (-1.31%) ⬇️
pkg/scheduler/objects/node.go 82.85% <0.00%> (-0.31%) ⬇️
pkg/scheduler/objects/simplepreemptor.go 98.83% <0.00%> (ø)
pkg/scheduler/objects/allocation.go 97.75% <0.00%> (+0.10%) ⬆️
pkg/scheduler/partition.go 74.78% <0.00%> (+0.56%) ⬆️
pkg/scheduler/objects/allocation_ask.go 95.83% <0.00%> (+6.22%) ⬆️
pkg/scheduler/objects/node_collection.go 95.48% <0.00%> (+7.51%) ⬆️

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 053a269...92e3141. Read the comment docs.

Copy link
Copy Markdown
Contributor

@wilfred-s wilfred-s left a comment

Choose a reason for hiding this comment

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

Test are looking promising but they leave a number of checks out to make sure we correctly test things.

Comment thread pkg/scheduler/objects/node_collection_test.go Outdated
Comment thread pkg/scheduler/objects/node_collection_test.go Outdated
Comment thread pkg/scheduler/objects/node_collection_test.go Outdated
Copy link
Copy Markdown
Contributor

@wilfred-s wilfred-s left a comment

Choose a reason for hiding this comment

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

LGTM

@wilfred-s wilfred-s closed this in 85c2fce Jul 15, 2022
@0yukali0 0yukali0 deleted the YUNIKORN-869 branch June 14, 2023 07:23
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.

2 participants