Skip to content

Conversation

@jasonjoo2010
Copy link
Collaborator

@jasonjoo2010 jasonjoo2010 commented Mar 5, 2019

Describe what this PR does / why we need it

By mock the class TimeUtil we can precisely control the sleep delay.

Not only the tests become stable but they would take less time to finish.

Does this pull request fix one issue?

Resolves #541

@CLAassistant
Copy link

CLAassistant commented Mar 5, 2019

CLA assistant check
All committers have signed the CLA.

@jasonjoo2010 jasonjoo2010 force-pushed the timeBasedTest branch 3 times, most recently from e5f461d to d34348d Compare March 5, 2019 18:10
@codecov-io
Copy link

codecov-io commented Mar 5, 2019

Codecov Report

Merging #546 into master will increase coverage by 0.25%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #546      +/-   ##
============================================
+ Coverage     37.68%   37.93%   +0.25%     
- Complexity     1102     1109       +7     
============================================
  Files           259      259              
  Lines          8171     8171              
  Branches       1113     1113              
============================================
+ Hits           3079     3100      +21     
+ Misses         4695     4666      -29     
- Partials        397      405       +8
Impacted Files Coverage Δ Complexity Δ
...ibaba/csp/sentinel/eagleeye/EagleEyeLogDaemon.java 30.3% <0%> (-15.16%) 6% <0%> (-2%)
...om/alibaba/csp/sentinel/eagleeye/SyncAppender.java 53.57% <0%> (-14.29%) 5% <0%> (-1%)
...a/csp/sentinel/slots/statistic/base/LeapArray.java 65.82% <0%> (-3.8%) 24% <0%> (-1%)
...sentinel/eagleeye/EagleEyeRollingFileAppender.java 28.9% <0%> (-2.32%) 11% <0%> (-1%)
...l/cluster/server/connection/ConnectionManager.java 74% <0%> (-2%) 10% <0%> (-1%)
...a/csp/sentinel/slots/statistic/base/LongAdder.java 31.91% <0%> (+14.89%) 10% <0%> (+6%) ⬆️
...java/com/alibaba/csp/sentinel/log/LoggerUtils.java 66.66% <0%> (+19.99%) 4% <0%> (+2%) ⬆️
...a/csp/sentinel/slots/statistic/base/Striped64.java 60.41% <0%> (+34.37%) 10% <0%> (+5%) ⬆️

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 226589f...0f99fd7. Read the comment docs.

@sczyh30 sczyh30 added the to-review To review label Mar 6, 2019
Copy link
Member

@sczyh30 sczyh30 left a comment

Choose a reason for hiding this comment

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

Please also reformat the relevant code.

Copy link
Member

@sczyh30 sczyh30 left a comment

Choose a reason for hiding this comment

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

LGTM

@sczyh30 sczyh30 merged commit 5d3ccb0 into alibaba:master Mar 6, 2019
@sczyh30
Copy link
Member

sczyh30 commented Mar 6, 2019

Nice, thanks for contributing!

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.

LeapArrayTest.testGetValidHead fails randomly

4 participants