Skip to content

add ResInfoTest.java ut#1928

Merged
samz406 merged 3 commits intoapache:devfrom
khadgarmage:ut-resinfo
Feb 11, 2020
Merged

add ResInfoTest.java ut#1928
samz406 merged 3 commits intoapache:devfrom
khadgarmage:ut-resinfo

Conversation

@khadgarmage
Copy link
Copy Markdown
Contributor

#1465
add ResInfoTest.java ut

@codecov-io
Copy link
Copy Markdown

codecov-io commented Feb 10, 2020

Codecov Report

Merging #1928 into dev will increase coverage by 0.47%.
The diff coverage is 60%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #1928      +/-   ##
==========================================
+ Coverage   25.01%   25.48%   +0.47%     
==========================================
  Files         298      297       -1     
  Lines       14328    14330       +2     
  Branches     2350     2350              
==========================================
+ Hits         3584     3652      +68     
+ Misses      10299    10226      -73     
- Partials      445      452       +7
Impacted Files Coverage Δ
.../apache/dolphinscheduler/common/utils/ResInfo.java 92.59% <60%> (+92.59%) ⬆️
...he/dolphinscheduler/common/thread/ThreadUtils.java 72.41% <0%> (-3.45%) ⬇️
...scheduler/alert/template/AlertTemplateFactory.java 42.85% <0%> (ø) ⬆️
...dolphinscheduler/dao/entity/ProcessDefinition.java 0% <0%> (ø) ⬆️
...cheduler/api/service/ProcessDefinitionService.java 40.3% <0%> (+4.64%) ⬆️
.../apache/dolphinscheduler/common/utils/OSUtils.java 26.89% <0%> (+14.28%) ⬆️

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 c447bb4...0ed6156. Read the comment docs.

@Test
public void testGetHeartBeatInfo() {
String info = ResInfo.getHeartBeatInfo(new Date());
Assert.assertEquals(info.split(",").length, 7);
Copy link
Copy Markdown
Contributor

@Jave-Chen Jave-Chen Feb 11, 2020

Choose a reason for hiding this comment

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

There is a code smell in Sonar analysis: Swap these 2 arguments so they are in the correct order: expected value, actual value.

https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&issues=AXAv9q6wCNVECePiTlLM&open=AXAv9q6wCNVECePiTlLM&pullRequest=1928

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

Copy link
Copy Markdown
Contributor

@Jave-Chen Jave-Chen left a comment

Choose a reason for hiding this comment

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

+1

Copy link
Copy Markdown
Contributor

@Eights-Li Eights-Li left a comment

Choose a reason for hiding this comment

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

+1

@khadgarmage khadgarmage removed the request for review from qiaozhanwei February 11, 2020 01:23
@sonarqubecloud
Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

77.8% 77.8% Coverage
0.0% 0.0% Duplication

@samz406 samz406 merged commit 95d6213 into apache:dev Feb 11, 2020
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.

5 participants