DATAREDIS-237 - Upgrade to Jedis 2.2.1.

Update to Jedis 2.2.1 and Implement newly supported Operations.
Handle removed BinaryTransaction class.
Handle some Jedis return types changed from String to bytes.
Handle some Jedis arg types changed from int to long by removing casting.
Remove ignored tests for issues fixed in Jedis 2.2.1
Throw UnsupportedOpException on multi-arg bitOp NOT
Ensure consistent results across all drivers when bitOp is called with NOT and more than one arg.
This commit is contained in:
Jennifer Hickey
2013-09-19 11:00:18 -04:00
committed by Christoph Strobl
parent 2870df0cdc
commit e1b421f942
17 changed files with 434 additions and 909 deletions

View File

@@ -480,7 +480,7 @@ public abstract class AbstractConnectionIntegrationTests {
verifyResults(Arrays.asList(new Object[] { 4l }));
}
@Test(expected = RedisSystemException.class)
@Test(expected =UnsupportedOperationException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testBitOpNotMultipleSources() {
connection.set("key1", "abcd");

View File

@@ -92,12 +92,6 @@ abstract public class AbstractConnectionPipelineIntegrationTests extends
super.testEvalReturnSingleError();
}
@Test(expected = RedisPipelineException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testBitOpNotMultipleSources() {
super.testBitOpNotMultipleSources();
}
@Test(expected = RedisPipelineException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testRestoreBadData() {

View File

@@ -75,135 +75,6 @@ public class JedisConnectionIntegrationTests extends AbstractConnectionIntegrati
connection = null;
}
@Test(expected=UnsupportedOperationException.class)
public void testPExpire() {
super.testPExpire();
}
@Test(expected=UnsupportedOperationException.class)
public void testPExpireKeyNotExists() {
super.testPExpireKeyNotExists();
}
@Test(expected=UnsupportedOperationException.class)
public void testPExpireAt() {
super.testPExpireAt();
}
@Test(expected=UnsupportedOperationException.class)
public void testPExpireAtKeyNotExists() {
super.testPExpireAtKeyNotExists();
}
@Test(expected=UnsupportedOperationException.class)
public void testPTtl() {
super.testPTtl();
}
@Test(expected=UnsupportedOperationException.class)
public void testPTtlNoExpire() {
super.testPTtlNoExpire();
}
@Test(expected=UnsupportedOperationException.class)
public void testDumpAndRestore() {
super.testDumpAndRestore();
}
@Test(expected=UnsupportedOperationException.class)
public void testDumpNonExistentKey() {
super.testDumpNonExistentKey();
}
@Test(expected=UnsupportedOperationException.class)
public void testRestoreBadData() {
super.testRestoreBadData();
}
@Test(expected=UnsupportedOperationException.class)
public void testRestoreExistingKey() {
super.testRestoreExistingKey();
}
@Test(expected=UnsupportedOperationException.class)
public void testRestoreTtl() {
super.testRestoreTtl();
}
@Test(expected=UnsupportedOperationException.class)
public void testBitCount() {
super.testBitCount();
}
@Test(expected=UnsupportedOperationException.class)
public void testBitCountInterval() {
super.testBitCountInterval();
}
@Test(expected=UnsupportedOperationException.class)
public void testBitCountNonExistentKey() {
super.testBitCountNonExistentKey();
}
@Test(expected=UnsupportedOperationException.class)
public void testBitOpAnd() {
super.testBitOpAnd();
}
@Test(expected=UnsupportedOperationException.class)
public void testBitOpOr() {
super.testBitOpOr();
}
@Test(expected=UnsupportedOperationException.class)
public void testBitOpXOr() {
super.testBitOpXOr();
}
@Test(expected=UnsupportedOperationException.class)
public void testBitOpNot() {
super.testBitOpNot();
}
@Test(expected=UnsupportedOperationException.class)
public void testBitOpNotMultipleSources() {
super.testBitOpNotMultipleSources();
}
@Test(expected=UnsupportedOperationException.class)
public void testHIncrByDouble() {
super.testHIncrByDouble();
}
@Test(expected=UnsupportedOperationException.class)
public void testIncrByDouble() {
super.testIncrByDouble();
}
@Test(expected=UnsupportedOperationException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testSRandMemberCount() {
super.testSRandMemberCount();
}
@Test(expected=UnsupportedOperationException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testSRandMemberCountKeyNotExists() {
super.testSRandMemberCountKeyNotExists();
}
@Test(expected=UnsupportedOperationException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testSRandMemberCountNegative() {
super.testSRandMemberCountNegative();
}
@Test(expected=UnsupportedOperationException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testInfoBySection() throws Exception {
super.testInfoBySection();
}
@Test
public void testCreateConnectionWithDb() {
JedisConnectionFactory factory2 = new JedisConnectionFactory();
@@ -270,6 +141,18 @@ public class JedisConnectionIntegrationTests extends AbstractConnectionIntegrati
super.testEvalShaArrayError();
}
@Test(expected=InvalidDataAccessApiUsageException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testRestoreBadData() {
super.testRestoreBadData();
}
@Test(expected=InvalidDataAccessApiUsageException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testRestoreExistingKey() {
super.testRestoreExistingKey();
}
@Test(expected=InvalidDataAccessApiUsageException.class)
public void testExecWithoutMulti() {
super.testExecWithoutMulti();

View File

@@ -63,22 +63,6 @@ public class JedisConnectionPipelineIntegrationTests extends
public void testGetConfig() {
}
@Ignore("https://github.com/xetorthio/jedis/pull/389 Pipeline tries to return List<String> instead of Long on sort")
public void testSortStore() {
}
@Ignore("Jedis issue: Pipeline tries to return Long instead of List<String> on sort with no params")
public void testSortNullParams() {
}
@Ignore("https://github.com/xetorthio/jedis/pull/389 Pipeline tries to return Long instead of List<String> on sort with no params")
public void testSortStoreNullParams() {
}
@Ignore("https://github.com/xetorthio/jedis/issues/438 Cannot get results from Pipeline after tx discard called")
public void testMultiDiscard() {
}
@Test
public void testWatch() {
connection.set("testitnow", "willdo");
@@ -141,166 +125,6 @@ public class JedisConnectionPipelineIntegrationTests extends
}
// Unsupported Ops
@Test(expected=UnsupportedOperationException.class)
public void testPExpire() {
super.testPExpire();
}
@Test(expected=UnsupportedOperationException.class)
public void testPExpireKeyNotExists() {
super.testPExpireKeyNotExists();
}
@Test(expected=UnsupportedOperationException.class)
public void testPExpireAt() {
super.testPExpireAt();
}
@Test(expected=UnsupportedOperationException.class)
public void testPExpireAtKeyNotExists() {
super.testPExpireAtKeyNotExists();
}
@Test(expected=UnsupportedOperationException.class)
public void testPTtl() {
super.testPTtl();
}
@Test(expected=UnsupportedOperationException.class)
public void testPTtlNoExpire() {
super.testPTtlNoExpire();
}
@Test(expected=UnsupportedOperationException.class)
public void testDumpAndRestore() {
super.testDumpAndRestore();
}
@Test(expected=UnsupportedOperationException.class)
public void testDumpNonExistentKey() {
super.testDumpNonExistentKey();
}
@Test(expected=UnsupportedOperationException.class)
public void testRestoreBadData() {
super.testRestoreBadData();
}
@Test(expected=UnsupportedOperationException.class)
public void testRestoreExistingKey() {
super.testRestoreExistingKey();
}
@Test(expected=UnsupportedOperationException.class)
public void testRestoreTtl() {
super.testRestoreTtl();
}
@Test(expected = UnsupportedOperationException.class)
public void testBitSet() throws Exception {
super.testBitSet();
}
@Test(expected = UnsupportedOperationException.class)
public void testBitGet() {
connection.getBit("bitly", 1l);
}
@Test(expected=UnsupportedOperationException.class)
public void testBitCount() {
connection.bitCount("foo");
}
@Test(expected=UnsupportedOperationException.class)
public void testBitCountInterval() {
super.testBitCountInterval();
}
@Test(expected=UnsupportedOperationException.class)
public void testBitCountNonExistentKey() {
super.testBitCountNonExistentKey();
}
@Test(expected=UnsupportedOperationException.class)
public void testBitOpAnd() {
super.testBitOpAnd();
}
@Test(expected=UnsupportedOperationException.class)
public void testBitOpOr() {
super.testBitOpOr();
}
@Test(expected=UnsupportedOperationException.class)
public void testBitOpXOr() {
super.testBitOpXOr();
}
@Test(expected=UnsupportedOperationException.class)
public void testBitOpNot() {
super.testBitOpNot();
}
@Test(expected=UnsupportedOperationException.class)
public void testBitOpNotMultipleSources() {
super.testBitOpNotMultipleSources();
}
@Test(expected = UnsupportedOperationException.class)
public void testRandomKey() {
super.testRandomKey();
}
@Test(expected = UnsupportedOperationException.class)
public void testGetRangeSetRange() {
super.testGetRangeSetRange();
}
@Test(expected = UnsupportedOperationException.class)
public void testPingPong() throws Exception {
super.testPingPong();
}
@Test(expected = UnsupportedOperationException.class)
public void testInfo() throws Exception {
super.testInfo();
}
@Test(expected = UnsupportedOperationException.class)
public void testZRevRangeByScore() {
super.testZRevRangeByScore();
}
@Test(expected = UnsupportedOperationException.class)
public void testZRevRangeByScoreOffsetCount() {
super.testZRevRangeByScoreOffsetCount();
}
@Test(expected = UnsupportedOperationException.class)
public void testZRevRangeByScoreWithScores() {
super.testZRevRangeByScoreWithScores();
}
@Test(expected = UnsupportedOperationException.class)
public void testZRevRangeByScoreWithScoresOffsetCount() {
super.testZRevRangeByScoreWithScoresOffsetCount();
}
@Test(expected = UnsupportedOperationException.class)
public void testSelect() {
super.testSelect();
}
@Test(expected=UnsupportedOperationException.class)
public void testHIncrByDouble() {
super.testHIncrByDouble();
}
@Test(expected=UnsupportedOperationException.class)
public void testIncrByDouble() {
super.testIncrByDouble();
}
@Test(expected=UnsupportedOperationException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testScriptLoadEvalSha() {
@@ -415,62 +239,14 @@ public class JedisConnectionPipelineIntegrationTests extends
connection.scriptFlush();
}
@Test(expected=UnsupportedOperationException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testSRandMemberCount() {
super.testSRandMemberCount();
}
@Test(expected=UnsupportedOperationException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testSRandMemberCountKeyNotExists() {
super.testSRandMemberCountKeyNotExists();
}
@Test(expected=UnsupportedOperationException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testSRandMemberCountNegative() {
super.testSRandMemberCountNegative();
}
@Test(expected=UnsupportedOperationException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testInfoBySection() throws Exception {
super.testInfoBySection();
}
@Test(expected=UnsupportedOperationException.class)
public void testHDelMultiple() {
super.testHDelMultiple();
}
@Test(expected=UnsupportedOperationException.class)
public void testLPushMultiple() {
super.testLPushMultiple();
}
@Test(expected=UnsupportedOperationException.class)
public void testRPushMultiple() {
super.testRPushMultiple();
}
@Test(expected=UnsupportedOperationException.class)
public void testSAddMultiple() {
super.testSAddMultiple();
}
@Test(expected=UnsupportedOperationException.class)
public void testSRemMultiple() {
super.testSRemMultiple();
}
@Test(expected=UnsupportedOperationException.class)
public void testZAddMultiple() {
super.testZAddMultiple();
}
@Test(expected=UnsupportedOperationException.class)
public void testZRemMultiple() {
super.testZRemMultiple();
}
}

View File

@@ -1,15 +1,14 @@
package org.springframework.data.redis.connection.jedis;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import java.util.Arrays;
import java.util.List;
import org.junit.Ignore;
import org.junit.Test;
import org.springframework.data.redis.connection.RedisPipelineException;
import org.springframework.test.annotation.IfProfileValue;
public class JedisConnectionPipelineTxIntegrationTests extends JedisConnectionTransactionIntegrationTests {
@@ -18,24 +17,6 @@ public class JedisConnectionPipelineTxIntegrationTests extends JedisConnectionTr
public void testGetConfig() {
}
@Ignore("https://github.com/xetorthio/jedis/pull/389 Pipeline tries to return List<String> instead of Long on sort")
public void testSortStore() {
}
@Ignore("Jedis issue: Pipeline tries to return Long instead of List<String> on sort with no params")
public void testSortNullParams() {
}
@Ignore("https://github.com/xetorthio/jedis/pull/389 Pipeline tries to return Long instead of List<String> on sort with no params")
public void testSortStoreNullParams() {
}
@Test
public void testEcho() {
actual.add(connection.echo("Hello World"));
verifyResults(Arrays.asList(new Object[] { "Hello World" }));
}
@Test(expected=RedisPipelineException.class)
public void exceptionExecuteNative() throws Exception {
connection.execute("set", "foo");
@@ -43,11 +24,16 @@ public class JedisConnectionPipelineTxIntegrationTests extends JedisConnectionTr
getResults();
}
@Test
public void testLastSave() {
connection.lastSave();
List<Object> results = getResults();
assertNotNull(results.get(0));
@Test(expected=RedisPipelineException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testRestoreBadData() {
super.testRestoreBadData();
}
@Test(expected=RedisPipelineException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testRestoreExistingKey() {
super.testRestoreExistingKey();
}
protected void initConnection() {

View File

@@ -19,6 +19,7 @@ import org.junit.After;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.dao.InvalidDataAccessApiUsageException;
import org.springframework.data.redis.connection.AbstractConnectionTransactionIntegrationTests;
import org.springframework.test.annotation.IfProfileValue;
import org.springframework.test.context.ContextConfiguration;
@@ -53,170 +54,11 @@ public class JedisConnectionTransactionIntegrationTests extends
connection = null;
}
@Ignore("DATAREDIS-143 transaction tries to return List<String> instead of Long on sort")
public void testSortStore() {
}
@Ignore("DATAREDIS-143 transaction tries to return Long instead of List<String> on sort with no params")
public void testSortStoreNullParams() {
@Ignore("Jedis issue: Transaction tries to return String instead of List<String>")
public void testGetConfig() {
}
// Unsupported Ops
@Test(expected = UnsupportedOperationException.class)
public void testPExpire() {
super.testPExpire();
}
@Test(expected = UnsupportedOperationException.class)
public void testPExpireKeyNotExists() {
super.testPExpireKeyNotExists();
}
@Test(expected = UnsupportedOperationException.class)
public void testPExpireAt() {
super.testPExpireAt();
}
@Test(expected = UnsupportedOperationException.class)
public void testPExpireAtKeyNotExists() {
super.testPExpireAtKeyNotExists();
}
@Test(expected = UnsupportedOperationException.class)
public void testPTtl() {
super.testPTtl();
}
@Test(expected = UnsupportedOperationException.class)
public void testPTtlNoExpire() {
super.testPTtlNoExpire();
}
@Test(expected = UnsupportedOperationException.class)
public void testDumpAndRestore() {
super.testDumpAndRestore();
}
@Test(expected = UnsupportedOperationException.class)
public void testDumpNonExistentKey() {
super.testDumpNonExistentKey();
}
@Test(expected = UnsupportedOperationException.class)
public void testRestoreBadData() {
super.testRestoreBadData();
}
@Test(expected = UnsupportedOperationException.class)
public void testRestoreExistingKey() {
super.testRestoreExistingKey();
}
@Test(expected = UnsupportedOperationException.class)
public void testRestoreTtl() {
super.testRestoreTtl();
}
@Test(expected = UnsupportedOperationException.class)
public void testBitSet() throws Exception {
super.testBitSet();
}
@Test(expected = UnsupportedOperationException.class)
public void testBitGet() {
connection.getBit("bitly", 1l);
}
@Test(expected = UnsupportedOperationException.class)
public void testBitCount() {
connection.bitCount("foo");
}
@Test(expected = UnsupportedOperationException.class)
public void testBitCountInterval() {
super.testBitCountInterval();
}
@Test(expected = UnsupportedOperationException.class)
public void testBitCountNonExistentKey() {
super.testBitCountNonExistentKey();
}
@Test(expected = UnsupportedOperationException.class)
public void testBitOpAnd() {
super.testBitOpAnd();
}
@Test(expected = UnsupportedOperationException.class)
public void testBitOpOr() {
super.testBitOpOr();
}
@Test(expected = UnsupportedOperationException.class)
public void testBitOpXOr() {
super.testBitOpXOr();
}
@Test(expected = UnsupportedOperationException.class)
public void testBitOpNot() {
super.testBitOpNot();
}
@Test(expected = UnsupportedOperationException.class)
public void testBitOpNotMultipleSources() {
super.testBitOpNotMultipleSources();
}
@Test(expected = UnsupportedOperationException.class)
public void testRandomKey() {
super.testRandomKey();
}
@Test(expected = UnsupportedOperationException.class)
public void testGetRangeSetRange() {
super.testGetRangeSetRange();
}
@Test(expected = UnsupportedOperationException.class)
public void testPingPong() throws Exception {
super.testPingPong();
}
@Test(expected = UnsupportedOperationException.class)
public void testInfo() throws Exception {
super.testInfo();
}
@Test(expected = UnsupportedOperationException.class)
public void testZRevRangeByScore() {
super.testZRevRangeByScore();
}
@Test(expected = UnsupportedOperationException.class)
public void testZRevRangeByScoreOffsetCount() {
super.testZRevRangeByScoreOffsetCount();
}
@Test(expected = UnsupportedOperationException.class)
public void testZRevRangeByScoreWithScores() {
super.testZRevRangeByScoreWithScores();
}
@Test(expected = UnsupportedOperationException.class)
public void testZRevRangeByScoreWithScoresOffsetCount() {
byteConnection.zRevRangeByScoreWithScores("myset".getBytes(), 0d, 3d, 0, 1);
}
@Test(expected = UnsupportedOperationException.class)
public void testHIncrByDouble() {
super.testHIncrByDouble();
}
@Test(expected = UnsupportedOperationException.class)
public void testIncrByDouble() {
super.testIncrByDouble();
}
@Test(expected = UnsupportedOperationException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testScriptLoadEvalSha() {
@@ -331,82 +173,26 @@ public class JedisConnectionTransactionIntegrationTests extends
connection.scriptFlush();
}
@Test(expected = UnsupportedOperationException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testSRandMemberCount() {
super.testSRandMemberCount();
}
@Test(expected = UnsupportedOperationException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testSRandMemberCountKeyNotExists() {
super.testSRandMemberCountKeyNotExists();
}
@Test(expected = UnsupportedOperationException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testSRandMemberCountNegative() {
super.testSRandMemberCountNegative();
}
@Test(expected = UnsupportedOperationException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testInfoBySection() throws Exception {
super.testInfoBySection();
}
@Test(expected = UnsupportedOperationException.class)
public void testGetConfig() {
connection.getConfig("*");
}
@Test(expected = UnsupportedOperationException.class)
public void testEcho() {
super.testEcho();
}
@Test(expected = UnsupportedOperationException.class)
public void testSelect() {
super.testSelect();
}
@Test(expected = UnsupportedOperationException.class)
public void testLastSave() {
super.testLastSave();
}
@Test(expected=UnsupportedOperationException.class)
public void testHDelMultiple() {
super.testHDelMultiple();
}
@Test(expected=UnsupportedOperationException.class)
public void testLPushMultiple() {
super.testLPushMultiple();
}
@Test(expected=UnsupportedOperationException.class)
public void testRPushMultiple() {
super.testRPushMultiple();
}
@Test(expected=UnsupportedOperationException.class)
public void testSAddMultiple() {
super.testSAddMultiple();
}
@Test(expected=UnsupportedOperationException.class)
public void testSRemMultiple() {
super.testSRemMultiple();
}
@Test(expected=UnsupportedOperationException.class)
public void testZAddMultiple() {
super.testZAddMultiple();
}
@Test(expected=UnsupportedOperationException.class)
public void testZRemMultiple() {
super.testZRemMultiple();
@Test(expected=InvalidDataAccessApiUsageException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testRestoreBadData() {
super.testRestoreBadData();
}
@Test(expected=InvalidDataAccessApiUsageException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testRestoreExistingKey() {
super.testRestoreExistingKey();
}
}

View File

@@ -415,11 +415,6 @@ public class JRedisConnectionIntegrationTests extends AbstractConnectionIntegrat
super.testBitOpNot();
}
@Test(expected=UnsupportedOperationException.class)
public void testBitOpNotMultipleSources() {
super.testBitOpNotMultipleSources();
}
@Test(expected=UnsupportedOperationException.class)
public void testHIncrByDouble() {
super.testHIncrByDouble();

View File

@@ -27,7 +27,6 @@ import org.springframework.data.redis.TestCondition;
import org.springframework.data.redis.connection.AbstractConnectionIntegrationTests;
import org.springframework.data.redis.connection.DefaultStringRedisConnection;
import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.data.redis.connection.RedisStringCommands.BitOperation;
import org.springframework.data.redis.connection.ReturnType;
import org.springframework.data.redis.connection.StringRedisConnection;
import org.springframework.test.annotation.IfProfileValue;
@@ -227,14 +226,6 @@ public class LettuceConnectionIntegrationTests extends AbstractConnectionIntegra
super.testSelect();
}
@Test(expected=UnsupportedOperationException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testBitOpNotMultipleSources() {
connection.set("key1", "abcd");
connection.set("key2", "efgh");
actual.add(connection.bitOp(BitOperation.NOT, "key3", "key1", "key2"));
}
@Test(expected=UnsupportedOperationException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testSRandMemberCountNegative() {

View File

@@ -23,7 +23,6 @@ import org.springframework.data.redis.SettingsUtils;
import org.springframework.data.redis.TestCondition;
import org.springframework.data.redis.connection.AbstractConnectionPipelineIntegrationTests;
import org.springframework.data.redis.connection.DefaultStringRedisConnection;
import org.springframework.data.redis.connection.RedisStringCommands.BitOperation;
import org.springframework.data.redis.connection.ReturnType;
import org.springframework.data.redis.connection.StringRedisConnection;
import org.springframework.test.annotation.IfProfileValue;
@@ -55,19 +54,6 @@ public class LettuceConnectionPipelineIntegrationTests extends
super.testSelect();
}
// LettuceConnection throws an UnsupportedOpException before we close the pipeline
@Test(expected=UnsupportedOperationException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testBitOpNotMultipleSources() {
connection.set("key1", "abcd");
connection.set("key2", "efgh");
try {
actual.add(connection.bitOp(BitOperation.NOT, "key3", "key1", "key2"));
}finally {
getResults();
}
}
@Test(expected=UnsupportedOperationException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testSRandMemberCountNegative() {

View File

@@ -47,11 +47,6 @@ public class LettuceConnectionTransactionIntegrationTests extends
public void exceptionExecuteNative() throws Exception {
}
@Test(expected = UnsupportedOperationException.class)
public void testBitOpNotMultipleSources() {
super.testBitOpNotMultipleSources();
}
@Test(expected = UnsupportedOperationException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testSRandMemberCountNegative() {

View File

@@ -77,12 +77,6 @@ public class SrpConnectionPipelineTxIntegrationTests extends SrpConnectionTransa
super.testRestoreExistingKey();
}
@Test(expected = RedisPipelineException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testBitOpNotMultipleSources() {
super.testBitOpNotMultipleSources();
}
@Test(expected = RedisPipelineException.class)
@IfProfileValue(name = "redisVersion", value = "2.6")
public void testRestoreBadData() {

View File

@@ -54,6 +54,7 @@ import org.springframework.data.redis.connection.DataType;
import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.data.redis.connection.StringRedisConnection;
import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
import org.springframework.data.redis.connection.jredis.JredisConnectionFactory;
import org.springframework.data.redis.connection.srp.SrpConnectionFactory;
import org.springframework.data.redis.core.ZSetOperations.TypedTuple;
import org.springframework.data.redis.core.query.SortQueryBuilder;
@@ -451,8 +452,8 @@ public class RedisTemplateTests<K,V> {
final K key1 = keyFactory.instance();
V value1 = valueFactory.instance();
assumeTrue(key1 instanceof String && value1 instanceof String);
// Jedis does not support pExpire
JedisConnectionFactory factory = new JedisConnectionFactory();
// JRedis does not support pExpire
JredisConnectionFactory factory = new JredisConnectionFactory();
factory.setHostName(SettingsUtils.getHost());
factory.setPort(SettingsUtils.getPort());
factory.afterPropertiesSet();

View File

@@ -153,7 +153,7 @@ public class RedisAtomicDoubleTests {
// JRedis converts Unix time to millis before sending command, so it expires right away
assumeTrue(!ConnectionUtils.isJredis(factory));
doubleCounter.set(7.8);
assertTrue(doubleCounter.expireAt(new Date(System.currentTimeMillis() + 2000)));
assertTrue(doubleCounter.expireAt(new Date(System.currentTimeMillis() + 10000)));
assertTrue(doubleCounter.getExpire() > 0);
}