Skip to content

Add unit tests for com.alibaba.csp.sentinel.util - #651

Merged
sczyh30 merged 2 commits into
alibaba:masterfrom
Diffblue-benchmarks:add-unit-test
Apr 9, 2019
Merged

Add unit tests for com.alibaba.csp.sentinel.util#651
sczyh30 merged 2 commits into
alibaba:masterfrom
Diffblue-benchmarks:add-unit-test

Conversation

@paulkennethkent

Copy link
Copy Markdown
Contributor

This test was written using Diffblue Cover.

Describe what this PR does / why we need it

I've analysed your code base and noticed that com.alibaba.csp.sentinel.util.IdUtil and com.alibaba.csp.sentinel.util.StringUtil are not fully tested.

Describe how you did it

I've written some tests for the functions in this class with the help of Diffblue Cover. Hopefully, these tests should help you detect any regressions caused by future code changes. If you would find it useful to have additional tests written for this repository, I would be more than happy to look at other particular classes that you consider important.

@CLAassistant

CLAassistant commented Apr 4, 2019

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@codecov-io

codecov-io commented Apr 4, 2019

Copy link
Copy Markdown

Codecov Report

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

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #651      +/-   ##
============================================
+ Coverage     40.41%   40.62%   +0.21%     
- Complexity     1187     1320     +133     
============================================
  Files           267      284      +17     
  Lines          7852     8923    +1071     
  Branches       1062     1193     +131     
============================================
+ Hits           3173     3625     +452     
- Misses         4281     4843     +562     
- Partials        398      455      +57
Impacted Files Coverage Δ Complexity Δ
.../alibaba/csp/sentinel/eagleeye/FastDateFormat.java 78.37% <0%> (ø) 6% <0%> (?)
...com/alibaba/csp/sentinel/eagleeye/TokenBucket.java 35.29% <0%> (ø) 1% <0%> (?)
...a/csp/sentinel/slots/statistic/base/Striped64.java 26.04% <0%> (ø) 5% <0%> (?)
...libaba/csp/sentinel/eagleeye/EagleEyeAppender.java 14.28% <0%> (ø) 1% <0%> (?)
...sentinel/eagleeye/EagleEyeRollingFileAppender.java 28.9% <0%> (ø) 11% <0%> (?)
...a/com/alibaba/csp/sentinel/eagleeye/StatEntry.java 20.21% <0%> (ø) 8% <0%> (?)
...om/alibaba/csp/sentinel/eagleeye/SyncAppender.java 53.57% <0%> (ø) 5% <0%> (?)
...ibaba/csp/sentinel/eagleeye/StatLogController.java 65.93% <0%> (ø) 5% <0%> (?)
...va/com/alibaba/csp/sentinel/eagleeye/EagleEye.java 39.47% <0%> (ø) 11% <0%> (?)
.../com/alibaba/csp/sentinel/eagleeye/StatLogger.java 66.66% <0%> (ø) 11% <0%> (?)
... and 11 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 29f22e3...6c89e13. Read the comment docs.

@sczyh30 sczyh30 added area/test Issue or PR related to test cases to-review To review labels Apr 8, 2019
Paul Kent added 2 commits April 8, 2019 14:01
This test was written using Diffblue Cover.
These tests were written using Diffblue cover.

@sczyh30 sczyh30 left a comment

Copy link
Copy Markdown
Member

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 4cc2542 into alibaba:master Apr 9, 2019
@sczyh30

sczyh30 commented Apr 9, 2019

Copy link
Copy Markdown
Member

Thanks!

@sczyh30 sczyh30 removed the to-review To review label Apr 9, 2019
blindpirate pushed a commit to blindpirate/Sentinel that referenced this pull request Apr 10, 2019
* Add unit test for com.alibaba.csp.sentinel.util.IdUtil
* Add unit tests for com.alibaba.csp.sentinel.util.StringUtil
CST11021 pushed a commit to CST11021/Sentinel that referenced this pull request Nov 3, 2021
…s for acl feature. (alibaba#651)

* [ISSUE#403] fix acl config file watch bug,clean and optimize the codes for acl feature.

* [ISSUE#403] fix acl config file watch bug,clean and optimize the codes for acl feature.

* [ISSUE#403]fix lock/unlock issue,and optimize the codes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/test Issue or PR related to test cases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants