-
Notifications
You must be signed in to change notification settings - Fork 478
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
Fix issue of connecting to influxdb without username/password on okhttp 4.x.x #644
Conversation
…p 4+ Add BasicAuthInterceptor to OkHttpClient.Builder only when username and password are not nul
Hi @vinh0604 thanks for this fix, i was experiencing the same when i tried to upgrade okhttp as part of my regular dependency updates. But i was to lazy to look into the root cause. So welcome ! actually all test are falling with:
this must be addressed first. I also have some small nits on the MR. |
Sorry, I didn't run stylecheck before pushing. Those issues were resolved now. |
Codecov Report
@@ Coverage Diff @@
## master #644 +/- ##
============================================
- Coverage 88.09% 88.06% -0.03%
Complexity 718 718
============================================
Files 69 69
Lines 2477 2480 +3
Branches 262 261 -1
============================================
+ Hits 2182 2184 +2
Misses 207 207
- Partials 88 89 +1
Continue to review full report at Codecov.
|
Now all checks have passed, great. May i asked you to add a additional unit test case to ensure that the extra if statement is covered. I really appreciate your contribution ! |
…eptor into OkHttp client
…ernal constructor used by test.
Thanks, I added one more test case in |
Thanks for contributing. |
This pull request is to fix the bug mentioned in #643 by only add
BasicAuthInterceptor
toOkHttpClient.Builder
when both username and password are not null.