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

Refactored CommonsConfigurationUtils for loading properties configuration. #13201

Merged

Conversation

abhioncbr
Copy link
Contributor

@abhioncbr abhioncbr commented May 22, 2024

As per the PR comment , we are unnecessarily setting the file in case it doesn't exist.

Similarly, for the other functions

  • In util function fromPath(reference), there is a possibility of ConfigurationException, if provided path value is null.
  • In util function fromInputStream(reference), again there is the possibility of the ConfigurationException

In this PR, we handle such scenarios and add the UTs corresponding to the util function.

cc: @klsince / @Jackie-Jiang

@codecov-commenter
Copy link

codecov-commenter commented May 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.22%. Comparing base (59551e4) to head (548a57a).
Report is 485 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #13201      +/-   ##
============================================
+ Coverage     61.75%   62.22%   +0.47%     
+ Complexity      207      198       -9     
============================================
  Files          2436     2531      +95     
  Lines        133233   138568    +5335     
  Branches      20636    21450     +814     
============================================
+ Hits          82274    86226    +3952     
- Misses        44911    45905     +994     
- Partials       6048     6437     +389     
Flag Coverage Δ
custom-integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration <0.01% <0.00%> (-0.01%) ⬇️
integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration2 0.00% <0.00%> (ø)
java-11 62.18% <100.00%> (+0.47%) ⬆️
java-21 62.11% <100.00%> (+0.48%) ⬆️
skip-bytebuffers-false 62.20% <100.00%> (+0.45%) ⬆️
skip-bytebuffers-true 62.09% <100.00%> (+34.36%) ⬆️
temurin 62.22% <100.00%> (+0.47%) ⬆️
unittests 62.22% <100.00%> (+0.47%) ⬆️
unittests1 46.68% <100.00%> (-0.21%) ⬇️
unittests2 27.91% <0.00%> (+0.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@abhioncbr abhioncbr changed the title Delete unnecessary setFile call. Refactored CommonsConfigurationUtils for loading properties configuration. May 23, 2024
@abhioncbr abhioncbr marked this pull request as ready for review May 23, 2024 01:29
@klsince klsince merged commit 0dec8a9 into apache:master May 23, 2024
19 checks passed
gortiz pushed a commit to gortiz/pinot that referenced this pull request Jun 14, 2024
…tion. (apache#13201)

* Delete unnecessary setFile call.

* Refactored CommonsConfigurationUtils for properties configuration creation and added UTs.
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.

3 participants