-
Notifications
You must be signed in to change notification settings - Fork 26.4k
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
[Dubbo-2017]Fix redis auth problem for RedisProtocol #2018
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2018 +/- ##
============================================
+ Coverage 52.14% 54.06% +1.91%
- Complexity 4902 5148 +246
============================================
Files 562 570 +8
Lines 25216 25600 +384
Branches 4449 4506 +57
============================================
+ Hits 13150 13840 +690
+ Misses 10060 9691 -369
- Partials 2006 2069 +63
Continue to review full report at Codecov.
|
final JedisPool jedisPool = new JedisPool(config, url.getHost(), url.getPort(DEFAULT_PORT), | ||
url.getParameter(Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT)); | ||
if (StringUtils.isBlank(url.getPassword())) { | ||
jedisPool = new JedisPool(config, url.getHost(), url.getPort(DEFAULT_PORT), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use StringUtils.isBlank(url.getPassword())?: style to replace if style, reduce reduplicated codes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kimmking You're right. thank you.
done
LGTM. &READY-TO-MERGE& |
BTW, need to merge to 2.6.x? @ningyu1 |
@diecui1202 Yes |
@diecui1202 merge to 2.6.x PR: #2146 |
What is the purpose of the change
Access redis using a password. #2017
Brief changelog
Fix redis auth problem for RedisProtocol, add parameter
db.index
for url.Verifying this change
modify: RedisProtocol.java
modify: RedisRegistry.java
add UT: RedisProtocolTest.testAuthRedis
add UT: RedisProtocolTest.testWrongAuthRedis
Follow this checklist to help us incorporate your contribution quickly and easily:
[Dubbo-XXX] Fix UnknownException when host config not exist #XXX
. Each commit in the pull request should have a meaningful subject line and body.mvn clean install -DskipTests
&mvn clean test-compile failsafe:integration-test
to make sure unit-test and integration-test pass.