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

[Backport 2.x] Clean up sysouts and replace with logger statements where necessary (#3231) #3240

Merged

Conversation

DarshitChanpura
Copy link
Member

Backports #3231.

Needed manual backport because of http5 imports and server shutdown (2.x) vs awaitTermination (main) method calls in test.

Check List

- [ ] New functionality includes testing
- [ ] New functionality has been documented

  • Commits are signed 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.

…pensearch-project#3231)

A lot of files (mostly tests) have sysout's which do nothing but degrade
the performance. This PR removes all sysouts from tests, replace sysouts
with logger in project files.
Also removes all e.printStacktrace(); calls.

- `tools/` package  - no sysouts were removed from here
- HTTPSpnegoAuthenticator.java - a portion was not modified since it
enabled debugging on console.

Signed-off-by: Darshit Chanpura <[email protected]>
(cherry picked from commit 683c4f5)
@codecov
Copy link

codecov bot commented Aug 25, 2023

Codecov Report

Merging #3240 (7f2eabb) into 2.x (abeedb1) will increase coverage by 0.02%.
The diff coverage is 50.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #3240      +/-   ##
============================================
+ Coverage     62.32%   62.35%   +0.02%     
+ Complexity     3293     3290       -3     
============================================
  Files           252      252              
  Lines         19467    19456      -11     
  Branches       3308     3308              
============================================
- Hits          12133    12131       -2     
+ Misses         5717     5704      -13     
- Partials       1617     1621       +4     
Files Changed Coverage Δ
...ic/auth/http/kerberos/HTTPSpnegoAuthenticator.java 0.00% <0.00%> (ø)
...ch/security/securityconf/DynamicConfigFactory.java 54.02% <ø> (+0.61%) ⬆️
...arch/security/ssl/OpenSearchSecuritySSLPlugin.java 85.11% <ø> (+1.55%) ⬆️
...opensearch/security/ssl/util/SSLRequestHelper.java 67.56% <0.00%> (+0.60%) ⬆️
...opensearch/security/tools/AuditConfigMigrater.java 0.00% <ø> (ø)
...n/java/org/opensearch/security/tools/Migrater.java 0.00% <ø> (ø)
...a/org/opensearch/security/tools/SecurityAdmin.java 41.46% <ø> (+0.08%) ⬆️
...g/opensearch/security/auditlog/sink/DebugSink.java 100.00% <100.00%> (ø)

... and 5 files with indirect coverage changes

peternied
peternied previously approved these changes Aug 25, 2023
peternied
peternied previously approved these changes Aug 25, 2023
@peternied peternied merged commit d0544cf into opensearch-project:2.x Aug 25, 2023
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