Merge branch '1.5.x'

This commit is contained in:
Andy Wilkinson
2017-06-16 09:13:42 +01:00
36 changed files with 109 additions and 111 deletions

View File

@@ -63,12 +63,10 @@ public class RedisTestServer implements TestRule {
ClassLoader classLoader = RedisTestServer.class.getClassLoader();
RedisConnectionFactory cf;
if (ClassUtils.isPresent("redis.clients.jedis.Jedis", classLoader)) {
cf = new JedisConnectionFactoryConfiguration()
.createConnectionFactory();
cf = new JedisConnectionFactoryConfiguration().createConnectionFactory();
}
else {
cf = new LettuceConnectionFactoryConfiguration()
.createConnectionFactory();
cf = new LettuceConnectionFactoryConfiguration().createConnectionFactory();
}
testConnection(cf);
@@ -142,8 +140,7 @@ public class RedisTestServer implements TestRule {
RedisConnectionFactory createConnectionFactory() {
LettuceClientConfiguration config = LettuceClientConfiguration.builder()
.shutdownTimeout(Duration.ofMillis(0))
.build();
.shutdownTimeout(Duration.ofMillis(0)).build();
LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory(
new RedisStandaloneConfiguration(), config);
connectionFactory.afterPropertiesSet();