Skip to content

Add more test coverage#100

Merged
msfroh merged 1 commit intoopensearch-project:mainfrom
msfroh:improve-coverage
Feb 8, 2023
Merged

Add more test coverage#100
msfroh merged 1 commit intoopensearch-project:mainfrom
msfroh:improve-coverage

Conversation

@msfroh
Copy link
Copy Markdown
Collaborator

@msfroh msfroh commented Feb 8, 2023

Added tests for Document, KendraClientSettings, and SimpleAwsErrorHandler.

Also deleted some dead code from TransformerType and
KendraIntelligentRankingException.

Works toward
#31

Signed-off-by: Michael Froh froh@amazon.com

Description

Added unit tests for Document, KendraClientSettings, and SimpleAwsErrorHandler.

Issues Resolved

#31

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed as per the DCO using --signoff

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.

@msfroh msfroh requested a review from a team February 8, 2023 00:01
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 8, 2023

Codecov Report

Merging #100 (4bd2298) into main (359289f) will increase coverage by 4.40%.
The diff coverage is 42.85%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff              @@
##               main     #100      +/-   ##
============================================
+ Coverage     76.53%   80.93%   +4.40%     
- Complexity      195      215      +20     
============================================
  Files            29       29              
  Lines           882      881       -1     
  Branches        119      120       +1     
============================================
+ Hits            675      713      +38     
+ Misses          146      106      -40     
- Partials         61       62       +1     
Impacted Files Coverage Δ
.../search/relevance/transformer/TransformerType.java 100.00% <ø> (+40.00%) ⬆️
...nking/model/KendraIntelligentRankingException.java 100.00% <ø> (+75.00%) ⬆️
...r/kendraintelligentranking/model/dto/Document.java 86.20% <42.85%> (+49.84%) ⬆️
...ntelligentranking/client/KendraClientSettings.java 97.36% <0.00%> (+34.21%) ⬆️
...telligentranking/client/SimpleAwsErrorHandler.java 100.00% <0.00%> (+85.71%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Added tests for Document, KendraClientSettings, and SimpleAwsErrorHandler.

Also deleted some dead code from TransformerType and
KendraIntelligentRankingException.

Works toward
opensearch-project#31

Signed-off-by: Michael Froh <froh@amazon.com>
*/
public Document() {
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

if no return type, should it be void?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It's a constructor.

It doesn't return anything so much as it initializes the object (in this case, it initializes all fields to null).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I see, thanks!

@msfroh msfroh merged commit 82e59f1 into opensearch-project:main Feb 8, 2023
@msfroh msfroh added the backport 2.x Backport to 2.x branch label Feb 24, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 24, 2023
Added tests for Document, KendraClientSettings, and SimpleAwsErrorHandler.

Also deleted some dead code from TransformerType and
KendraIntelligentRankingException.

Works toward
#31

Signed-off-by: Michael Froh <froh@amazon.com>
(cherry picked from commit 82e59f1)
mingshl pushed a commit that referenced this pull request Feb 24, 2023
Added tests for Document, KendraClientSettings, and SimpleAwsErrorHandler.

Also deleted some dead code from TransformerType and
KendraIntelligentRankingException.

Works toward
#31

Signed-off-by: Michael Froh <froh@amazon.com>
(cherry picked from commit 82e59f1)

Co-authored-by: msfroh <froh@amazon.com>
@noCharger noCharger mentioned this pull request Mar 3, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 2.x Backport to 2.x branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants