Skip to content

Fix socket bug: read before sock connect. Add UT for FourLetterWordMain.#1954

Merged
davidzollo merged 4 commits intoapache:devfrom
Jave-Chen:bcai-dev-fix-bug-20200212
Feb 14, 2020
Merged

Fix socket bug: read before sock connect. Add UT for FourLetterWordMain.#1954
davidzollo merged 4 commits intoapache:devfrom
Jave-Chen:bcai-dev-fix-bug-20200212

Conversation

@Jave-Chen
Copy link
Copy Markdown
Contributor

What is the purpose of the pull request

#1889
Fix get wrong zk status with 4 letter command.

Brief change log

  1. Read after sock connect.
  2. Add UT for FourLetterWordMain.

@Jave-Chen
Copy link
Copy Markdown
Contributor Author

Seems like using @PrepareForTest({FourLetterWordMain.class, Socket.class}) cause UT coverage 0 .

@codecov-io
Copy link
Copy Markdown

codecov-io commented Feb 14, 2020

Codecov Report

Merging #1954 into dev will increase coverage by 1.91%.
The diff coverage is 50%.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev    #1954      +/-   ##
============================================
+ Coverage     25.27%   27.18%   +1.91%     
- Complexity     1322     1383      +61     
============================================
  Files           312      312              
  Lines         16642    16643       +1     
  Branches       2048     2048              
============================================
+ Hits           4206     4525     +319     
+ Misses        11978    11641     -337     
- Partials        458      477      +19
Impacted Files Coverage Δ Complexity Δ
...hinscheduler/dao/datasource/ConnectionFactory.java 0% <ø> (ø) 0 <0> (ø) ⬇️
...e/dolphinscheduler/server/worker/WorkerServer.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...nscheduler/common/job/db/ClickHouseDataSource.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...che/dolphinscheduler/common/utils/CommonUtils.java 40% <0%> (+40%) 5 <0> (+5) ⬆️
...apache/dolphinscheduler/alert/utils/Constants.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...e/dolphinscheduler/server/master/MasterServer.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...er/server/worker/task/AbstractCommandExecutor.java 40.1% <0%> (ø) 14 <0> (ø) ⬇️
.../dolphinscheduler/dao/utils/cron/CycleFactory.java 34.72% <0%> (-0.49%) 5 <0> (ø)
.../apache/dolphinscheduler/api/utils/CheckUtils.java 61.53% <0%> (+9.53%) 19 <0> (+3) ⬆️
...dolphinscheduler/api/service/ResourcesService.java 79.66% <0%> (ø) 67 <0> (ø) ⬇️
... and 22 more

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 d204aa1...60346f3. Read the comment docs.

@sonarqubecloud
Copy link
Copy Markdown

SonarCloud Quality Gate failed.

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

0.0% 0.0% Coverage
0.0% 0.0% Duplication

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

@davidzollo davidzollo merged commit cdd53a7 into apache:dev Feb 14, 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.

3 participants