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 tests for uncovered cases #24

Merged
merged 1 commit into from
Sep 10, 2023
Merged

Conversation

dbwiddis
Copy link
Member

@dbwiddis dbwiddis commented Sep 9, 2023

Description

Adds tests for most of the uncovered lines.

$ poetry run coverage report
Name                                                                     Stmts   Miss  Cover
--------------------------------------------------------------------------------------------
TOTAL                                                                     2233     31    99%

(To be fair, that report includes test lines, so it's not quite that good. 🤷 )

From the CI test: codecov/project — 93.44% (+1.90%) compared to c31b5b8

Misses are:

  • internal handler classes not yet implemented (10 lines), ignoring for now
  • auto-generated protobuf files (8 lines) (See Handling auto-generated protobuf files #23)
  • setters on outbound message that I'm not sure how to test (please help)
  • pass on an abstract method (can't test)
  • in StreamInput.read_array_size(), the size is read as a v_int which cannot be negative, so the exception on negative array size branch of code is unreachable (the test is there to catch integer overflow in Java, should it be removed?)
  • No test of InvalidTraceDataFormat in the netty tests all based on valid logs (why are we including test files in test coverage?)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@codecov
Copy link

codecov bot commented Sep 9, 2023

Codecov Report

Merging #24 (14343b4) into main (c31b5b8) will increase coverage by 1.90%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main      #24      +/-   ##
==========================================
+ Coverage   91.53%   93.44%   +1.90%     
==========================================
  Files          43       43              
  Lines        1205     1205              
==========================================
+ Hits         1103     1126      +23     
+ Misses        102       79      -23     

see 14 files with indirect coverage changes

Signed-off-by: Daniel Widdis <widdis@gmail.com>
@dblock dblock merged commit 984b217 into opensearch-project:main Sep 10, 2023
6 checks passed
@dbwiddis dbwiddis deleted the add-tests branch September 10, 2023 16:02
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.

2 participants