DATAREDIS-1045 - Apply password to all Sentinel endpoints.

We now apply the password to all Sentinel endpoints described through RedisURI.

We also apply all remaining settings to all Sentinel endpoints to ensure configuration propagation.

Original Pull Request: #490
This commit is contained in:
Mark Paluch
2019-10-29 16:36:38 +01:00
committed by Christoph Strobl
parent 3dfe7af60e
commit 049f4d78ab
2 changed files with 23 additions and 7 deletions

View File

@@ -179,7 +179,7 @@ public class LettuceConnectionFactoryUnitTests {
}
}
@Test // DATAREDIS-524
@Test // DATAREDIS-524, DATAREDIS-1045
public void passwordShouldBeSetCorrectlyOnSentinelClient() {
LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory(
@@ -195,6 +195,11 @@ public class LettuceConnectionFactoryUnitTests {
RedisURI redisUri = (RedisURI) getField(client, "redisURI");
assertThat(redisUri.getPassword()).isEqualTo(connectionFactory.getPassword().toCharArray());
for (RedisURI sentinel : redisUri.getSentinels()) {
assertThat(sentinel.getPassword())
.isEqualTo(connectionFactory.getPassword().toCharArray());
}
}
@Test // DATAREDIS-462