Skip to content

modify LoggerServiceTest UT by mock#1916

Merged
Jave-Chen merged 20 commits intoapache:devfrom
samz406:dev
Feb 11, 2020
Merged

modify LoggerServiceTest UT by mock#1916
Jave-Chen merged 20 commits intoapache:devfrom
samz406:dev

Conversation

@samz406
Copy link
Copy Markdown
Contributor

@samz406 samz406 commented Feb 9, 2020

For #1465
modify LoggerServiceTest UT by mock
modify LoggerService

modify root pom

<include>**/api/service/LoggerServiceTest.java</include>

@codecov-io
Copy link
Copy Markdown

codecov-io commented Feb 9, 2020

Codecov Report

Merging #1916 into dev will increase coverage by 1.35%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #1916      +/-   ##
==========================================
+ Coverage   24.27%   25.63%   +1.35%     
==========================================
  Files         298      298              
  Lines       14388    14646     +258     
  Branches     2371     2482     +111     
==========================================
+ Hits         3493     3754     +261     
+ Misses      10468    10434      -34     
- Partials      427      458      +31
Impacted Files Coverage Δ
...he/dolphinscheduler/api/service/LoggerService.java 100% <100%> (+95%) ⬆️
...er/common/utils/placeholder/BusinessTimeUtils.java 85.71% <0%> (-5.96%) ⬇️
...olphinscheduler/api/controller/BaseController.java 3% <0%> (-0.66%) ⬇️
...dolphinscheduler/dao/entity/ProcessDefinition.java 0% <0%> (ø) ⬆️
...cheduler/api/service/ProcessDefinitionService.java 40.87% <0%> (+5.2%) ⬆️
...che/dolphinscheduler/common/utils/StringUtils.java 8.45% <0%> (+8.45%) ⬆️
...scheduler/alert/template/AlertTemplateFactory.java 57.14% <0%> (+14.28%) ⬆️
...he/dolphinscheduler/common/utils/ScriptRunner.java 58.04% <0%> (+58.04%) ⬆️
...org/apache/dolphinscheduler/api/log/LogClient.java 69.44% <0%> (+69.44%) ⬆️

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 49b4d08...1172abe. Read the comment docs.

@RunWith(SpringRunner.class)
@SpringBootTest(classes = ApiApplicationServer.class)
@RunWith(PowerMockRunner.class)
@PrepareForTest({LoggerService.class})
Copy link
Copy Markdown
Contributor

@Jave-Chen Jave-Chen Feb 10, 2020

Choose a reason for hiding this comment

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

Repalce @RunWith(PowerMockRunner.class) with @RunWith(MockitoJUnitRunner.Silent.class) will get right coverage。

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.

modify @RunWith(MockitoJUnitRunner.class)

Copy link
Copy Markdown
Contributor

@davidzollo davidzollo left a comment

Choose a reason for hiding this comment

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

+1

@sonarqubecloud
Copy link
Copy Markdown

SonarCloud Quality Gate failed.

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

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@Jave-Chen Jave-Chen merged commit 6a94f2d into apache:dev Feb 11, 2020
@Jave-Chen
Copy link
Copy Markdown
Contributor

Empty stirng code smell is acceptable.

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.

4 participants