|
18 | 18 | import static org.assertj.core.api.Assertions.*;
|
19 | 19 | import static org.mockito.Mockito.*;
|
20 | 20 |
|
| 21 | +import redis.clients.jedis.JedisClientConfig; |
21 | 22 | import redis.clients.jedis.JedisCluster;
|
22 | 23 | import redis.clients.jedis.JedisClusterConnectionHandler;
|
23 | 24 | import redis.clients.jedis.JedisClusterInfoCache;
|
@@ -292,7 +293,7 @@ void shouldReturnClusterConfiguration() {
|
292 | 293 | assertThat(connectionFactory.getClusterConfiguration()).isSameAs(configuration);
|
293 | 294 | }
|
294 | 295 |
|
295 |
| - @Test // DATAREDIS-974 |
| 296 | + @Test // DATAREDIS-974, GH-2017 |
296 | 297 | void shouldApplySslConfigWhenCreatingClusterClient() throws NoSuchAlgorithmException {
|
297 | 298 |
|
298 | 299 | SSLParameters sslParameters = new SSLParameters();
|
@@ -323,16 +324,17 @@ void shouldApplySslConfigWhenCreatingClusterClient() throws NoSuchAlgorithmExcep
|
323 | 324 | JedisClusterConnectionHandler connectionHandler = (JedisClusterConnectionHandler) ReflectionTestUtils
|
324 | 325 | .getField(cluster, "connectionHandler");
|
325 | 326 | JedisClusterInfoCache cache = (JedisClusterInfoCache) ReflectionTestUtils.getField(connectionHandler, "cache");
|
326 |
| - |
327 |
| - assertThat(ReflectionTestUtils.getField(cache, "connectionTimeout")).isEqualTo(60000); |
328 |
| - assertThat(ReflectionTestUtils.getField(cache, "soTimeout")).isEqualTo(300000); |
329 |
| - assertThat(ReflectionTestUtils.getField(cache, "password")).isNull(); |
330 |
| - assertThat(ReflectionTestUtils.getField(cache, "clientName")).isEqualTo("my-client"); |
331 |
| - assertThat(ReflectionTestUtils.getField(cache, "ssl")).isEqualTo(true); |
332 |
| - assertThat(ReflectionTestUtils.getField(cache, "sslSocketFactory")).isEqualTo(socketFactory); |
333 |
| - assertThat(ReflectionTestUtils.getField(cache, "sslParameters")).isEqualTo(sslParameters); |
334 |
| - assertThat(ReflectionTestUtils.getField(cache, "hostnameVerifier")).isEqualTo(hostNameVerifier); |
335 |
| - assertThat(ReflectionTestUtils.getField(cache, "hostAndPortMap")).isNull(); |
| 327 | + JedisClientConfig clientConfig = (JedisClientConfig) ReflectionTestUtils.getField(cache, "clientConfig"); |
| 328 | + |
| 329 | + assertThat(clientConfig.getConnectionTimeoutMillis()).isEqualTo(60000); |
| 330 | + assertThat(clientConfig.getSocketTimeoutMillis()).isEqualTo(300000); |
| 331 | + assertThat(clientConfig.getPassword()).isNull(); |
| 332 | + assertThat(clientConfig.getClientName()).isEqualTo("my-client"); |
| 333 | + assertThat(clientConfig.isSsl()).isEqualTo(true); |
| 334 | + assertThat(clientConfig.getSslSocketFactory()).isEqualTo(socketFactory); |
| 335 | + assertThat(clientConfig.getSslParameters()).isEqualTo(sslParameters); |
| 336 | + assertThat(clientConfig.getHostnameVerifier()).isEqualTo(hostNameVerifier); |
| 337 | + assertThat(clientConfig.getHostAndPortMapper()).isNull(); |
336 | 338 | }
|
337 | 339 |
|
338 | 340 | @Test // DATAREDIS-574
|
|
0 commit comments