DATAREDIS-506 - Upgrade to Jedis 2.9.0.

We now support Jedis 2.9.0 with Redis Standalone SSL and Redis Cluster with passwords. The code is compatible with Jedis 2.8.0 when not using SSL or Redis Cluster with passwords.

Original Pull Request: #211
This commit is contained in:
Mark Paluch
2016-07-25 15:28:39 +02:00
committed by Christoph Strobl
parent 34f2d95669
commit 1a332c0f57
6 changed files with 58 additions and 14 deletions

View File

@@ -71,6 +71,7 @@ import org.springframework.data.redis.connection.RedisZSetCommands.Range;
import org.springframework.data.redis.connection.RedisZSetCommands.Tuple;
import org.springframework.data.redis.connection.SortParameters.Order;
import org.springframework.data.redis.connection.StringRedisConnection.StringTuple;
import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
import org.springframework.data.redis.core.Cursor;
import org.springframework.data.redis.core.ScanOptions;
import org.springframework.data.redis.core.StringRedisTemplate;
@@ -830,7 +831,12 @@ public abstract class AbstractConnectionIntegrationTests {
connection.set("testitnow", "somethingelse");
actual.add(connection.exec());
actual.add(connection.get("testitnow"));
verifyResults(Arrays.asList(new Object[] { null, "something" }));
if (connectionFactory instanceof JedisConnectionFactory) {
verifyResults(Arrays.asList(new Object[] { Collections.emptyList(), "something" }));
} else {
verifyResults(Arrays.asList(new Object[] { null, "something" }));
}
}
@SuppressWarnings("unchecked")

View File

@@ -72,6 +72,7 @@ import org.springframework.data.redis.serializer.StringRedisSerializer;
* @author Christoph Strobl
* @author Anqing Shao
* @author Duobiao Ou
* @author Mark Paluch
*/
@RunWith(Parameterized.class)
public class RedisTemplateTests<K, V> {
@@ -785,7 +786,12 @@ public class RedisTemplateTests<K, V> {
return operations.exec();
}
});
assertNull(results);
if (redisTemplate.getConnectionFactory() instanceof JedisConnectionFactory) {
assertThat(results, is(empty()));
} else {
assertNull(results);
}
assertThat(redisTemplate.opsForValue().get(key1), isEqual(value2));
}
@@ -848,7 +854,13 @@ public class RedisTemplateTests<K, V> {
return operations.exec();
}
});
assertNull(results);
if (redisTemplate.getConnectionFactory() instanceof JedisConnectionFactory) {
assertThat(results, is(empty()));
} else {
assertNull(results);
}
assertThat(redisTemplate.opsForValue().get(key1), isEqual(value2));
}