Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Improve Test coverage up to 48% #255

Merged

Conversation

yu-sun-77
Copy link
Contributor

@yu-sun-77 yu-sun-77 commented Dec 8, 2020

Fixes #, if available:
#253

Description of changes:

  1. improve UT coverage up to 48%
  2. add missing license header to new files

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov
Copy link

codecov bot commented Dec 8, 2020

Codecov Report

Merging #255 (20c0287) into master (b2ed391) will increase coverage by 16.22%.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff              @@
##             master     #255       +/-   ##
=============================================
+ Coverage     31.77%   48.00%   +16.22%     
- Complexity      116      195       +79     
=============================================
  Files            39       39               
  Lines          2008     2000        -8     
  Branches        150      150               
=============================================
+ Hits            638      960      +322     
+ Misses         1335      985      -350     
- Partials         35       55       +20     
Impacted Files Coverage Δ Complexity Δ
...performanceanalyzer/PerformanceAnalyzerPlugin.java 80.21% <ø> (+70.11%) 11.00 <0.00> (+8.00)
...analyzer/collectors/MasterServiceEventMetrics.java 9.01% <0.00%> (+9.01%) 2.00% <0.00%> (+2.00%)
...rformanceAnalyzerOverridesClusterConfigAction.java 11.68% <0.00%> (+11.68%) 2.00% <0.00%> (+2.00%)
...action/config/PerformanceAnalyzerConfigAction.java 17.18% <0.00%> (+17.18%) 3.00% <0.00%> (+3.00%)
...manceanalyzer/collectors/MasterServiceMetrics.java 19.23% <0.00%> (+19.23%) 2.00% <0.00%> (+2.00%)
...config/PerformanceAnalyzerClusterConfigAction.java 20.51% <0.00%> (+20.51%) 2.00% <0.00%> (+2.00%)
...nalyzer/config/setting/ClusterSettingsManager.java 21.55% <0.00%> (+20.68%) 7.00% <0.00%> (+6.00%)
...ormanceanalyzer/writer/EventLogQueueProcessor.java 25.00% <0.00%> (+25.00%) 3.00% <0.00%> (+3.00%)
...yzer/action/PerformanceAnalyzerActionListener.java 33.33% <0.00%> (+33.33%) 4.00% <0.00%> (+4.00%)
...ig/setting/PerformanceAnalyzerClusterSettings.java 88.88% <0.00%> (+33.33%) 1.00% <0.00%> (+1.00%)
... and 9 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 b2ed391...20c0287. Read the comment docs.

@yu-sun-77 yu-sun-77 changed the title Improve Test coverage up to 50.9% Improve Test coverage up to 48% Dec 8, 2020
Copy link
Contributor

@rguo-aws rguo-aws left a comment

Choose a reason for hiding this comment

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

LGTM. just one minor comment

assertEquals(CircuitBreaker.FIELDDATA, metrics.get(1).getType());
assertEquals(CircuitBreaker.IN_FLIGHT_REQUESTS, metrics.get(2).getType());
assertEquals(CircuitBreaker.ACCOUNTING, metrics.get(3).getType());
assertEquals(CircuitBreaker.PARENT, metrics.get(4).getType());
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we do some basic sanity check to verify the circuit breaker values here ?

@yu-sun-77 yu-sun-77 merged commit c9190f9 into opendistro-for-elasticsearch:master Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants