Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add some unit test for sentinel-transport-netty-http module #321

Merged
merged 2 commits into from
Dec 26, 2018

Conversation

cdfive
Copy link
Collaborator

@cdfive cdfive commented Dec 20, 2018

Describe what this PR does / why we need it

The sentinel-transport-netty-http module doesn't have test package, add some unit test.

Does this pull request fix one issue?

NONE

Describe how you did it

Import junit and mockito-core dependency, and use Netty's EmbeddedChannel for test ChannelHandler.

Describe how to verify it

run mvn test

Special notes for reviews

one test case testGetRuleCommandFlowSomeRules, since I haven't found a good way yet,comment the @Test annotation and marked it with the FIXME comment, for improving it in the future.

@sczyh30 sczyh30 added the to-review To review label Dec 20, 2018
@codecov-io
Copy link

codecov-io commented Dec 20, 2018

Codecov Report

Merging #321 into master will decrease coverage by 0.43%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #321      +/-   ##
============================================
- Coverage     38.71%   38.28%   -0.44%     
+ Complexity      936      930       -6     
============================================
  Files           218      218              
  Lines          6912     6912              
  Branches        938      938              
============================================
- Hits           2676     2646      -30     
- Misses         3897     3932      +35     
+ Partials        339      334       -5
Impacted Files Coverage Δ Complexity Δ
...a/csp/sentinel/slots/statistic/base/Striped64.java 26.04% <0%> (-23.96%) 5% <0%> (-2%)
...a/csp/sentinel/slots/statistic/base/LongAdder.java 17.02% <0%> (-14.9%) 4% <0%> (-4%)

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 c7c59e9...0ee6b73. Read the comment docs.

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 4fbccd8 into alibaba:master Dec 26, 2018
@sczyh30
Copy link
Member

sczyh30 commented Dec 26, 2018

Great! Thanks for contributing!

@sczyh30 sczyh30 removed the to-review To review label Dec 26, 2018
canglang1973 pushed a commit to canglang1973/Sentinel that referenced this pull request Dec 26, 2018
Arlmls pushed a commit to Arlmls/Sentinel that referenced this pull request Jan 8, 2019
@sczyh30 sczyh30 added the area/test Issue or PR related to test cases label Jan 28, 2019
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.

3 participants