Fix Lettuce eval suppressing Exceptions in List return
DATAREDIS-232
This commit is contained in:
@@ -188,6 +188,13 @@ public abstract class AbstractConnectionIntegrationTests {
|
||||
new String(scriptResults.get(1)) }));
|
||||
}
|
||||
|
||||
@Test(expected=RedisSystemException.class)
|
||||
@IfProfileValue(name = "redisVersion", value = "2.6")
|
||||
public void testEvalShaArrayError() {
|
||||
connection.evalSha("notasha", ReturnType.MULTI, 1, "key1", "arg1");
|
||||
getResults();
|
||||
}
|
||||
|
||||
@Test(expected = RedisSystemException.class)
|
||||
@IfProfileValue(name = "redisVersion", value = "2.6")
|
||||
public void testEvalShaNotFound() {
|
||||
@@ -255,6 +262,14 @@ public abstract class AbstractConnectionIntegrationTests {
|
||||
verifyResults(Arrays.asList(new Object[] { Arrays.asList(new Object[] { 1l, 2l }) }));
|
||||
}
|
||||
|
||||
@Test(expected=RedisSystemException.class)
|
||||
@IfProfileValue(name = "redisVersion", value = "2.6")
|
||||
public void testEvalArrayScriptError() {
|
||||
// Syntax error
|
||||
connection.eval("return {1,2", ReturnType.MULTI, 1, "foo", "bar");
|
||||
getResults();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Test
|
||||
@IfProfileValue(name = "redisVersion", value = "2.6")
|
||||
|
||||
@@ -110,6 +110,18 @@ abstract public class AbstractConnectionPipelineIntegrationTests extends
|
||||
super.testRestoreExistingKey();
|
||||
}
|
||||
|
||||
@Test(expected=RedisPipelineException.class)
|
||||
@IfProfileValue(name = "redisVersion", value = "2.6")
|
||||
public void testEvalArrayScriptError() {
|
||||
super.testEvalArrayScriptError();
|
||||
}
|
||||
|
||||
@Test(expected=RedisPipelineException.class)
|
||||
@IfProfileValue(name = "redisVersion", value = "2.6")
|
||||
public void testEvalShaArrayError() {
|
||||
super.testEvalShaArrayError();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOpenPipelineTwice() {
|
||||
connection.openPipeline();
|
||||
|
||||
@@ -237,12 +237,24 @@ public class JedisConnectionIntegrationTests extends AbstractConnectionIntegrati
|
||||
connection.eval("return redis.call('expire','foo')", ReturnType.BOOLEAN, 0);
|
||||
}
|
||||
|
||||
@Test(expected=InvalidDataAccessApiUsageException.class)
|
||||
@IfProfileValue(name = "redisVersion", value = "2.6")
|
||||
public void testEvalArrayScriptError() {
|
||||
super.testEvalArrayScriptError();
|
||||
}
|
||||
|
||||
@Test(expected=InvalidDataAccessApiUsageException.class)
|
||||
@IfProfileValue(name = "redisVersion", value = "2.6")
|
||||
public void testEvalShaNotFound() {
|
||||
connection.evalSha("somefakesha", ReturnType.VALUE, 2, "key1", "key2");
|
||||
}
|
||||
|
||||
@Test(expected=InvalidDataAccessApiUsageException.class)
|
||||
@IfProfileValue(name = "redisVersion", value = "2.6")
|
||||
public void testEvalShaArrayError() {
|
||||
super.testEvalShaArrayError();
|
||||
}
|
||||
|
||||
@Test(expected=InvalidDataAccessApiUsageException.class)
|
||||
public void testExecWithoutMulti() {
|
||||
super.testExecWithoutMulti();
|
||||
|
||||
@@ -319,6 +319,18 @@ public class JedisConnectionPipelineIntegrationTests extends
|
||||
super.testEvalShaNotFound();
|
||||
}
|
||||
|
||||
@Test(expected=UnsupportedOperationException.class)
|
||||
@IfProfileValue(name = "redisVersion", value = "2.6")
|
||||
public void testEvalShaArrayError() {
|
||||
super.testEvalShaArrayError();
|
||||
}
|
||||
|
||||
@Test(expected=UnsupportedOperationException.class)
|
||||
@IfProfileValue(name = "redisVersion", value = "2.6")
|
||||
public void testEvalArrayScriptError() {
|
||||
super.testEvalArrayScriptError();
|
||||
}
|
||||
|
||||
@Test(expected=UnsupportedOperationException.class)
|
||||
@IfProfileValue(name = "redisVersion", value = "2.6")
|
||||
public void testEvalReturnString() {
|
||||
|
||||
@@ -235,6 +235,18 @@ public class JedisConnectionTransactionIntegrationTests extends
|
||||
super.testEvalShaNotFound();
|
||||
}
|
||||
|
||||
@Test(expected=UnsupportedOperationException.class)
|
||||
@IfProfileValue(name = "redisVersion", value = "2.6")
|
||||
public void testEvalShaArrayError() {
|
||||
super.testEvalShaArrayError();
|
||||
}
|
||||
|
||||
@Test(expected=UnsupportedOperationException.class)
|
||||
@IfProfileValue(name = "redisVersion", value = "2.6")
|
||||
public void testEvalArrayScriptError() {
|
||||
super.testEvalArrayScriptError();
|
||||
}
|
||||
|
||||
@Test(expected = UnsupportedOperationException.class)
|
||||
@IfProfileValue(name = "redisVersion", value = "2.6")
|
||||
public void testEvalReturnString() {
|
||||
|
||||
@@ -453,6 +453,18 @@ public class JRedisConnectionIntegrationTests extends AbstractConnectionIntegrat
|
||||
super.testEvalShaNotFound();
|
||||
}
|
||||
|
||||
@Test(expected=UnsupportedOperationException.class)
|
||||
@IfProfileValue(name = "redisVersion", value = "2.6")
|
||||
public void testEvalShaArrayError() {
|
||||
super.testEvalShaArrayError();
|
||||
}
|
||||
|
||||
@Test(expected=UnsupportedOperationException.class)
|
||||
@IfProfileValue(name = "redisVersion", value = "2.6")
|
||||
public void testEvalArrayScriptError() {
|
||||
super.testEvalArrayScriptError();
|
||||
}
|
||||
|
||||
@Test(expected=UnsupportedOperationException.class)
|
||||
@IfProfileValue(name = "redisVersion", value = "2.6")
|
||||
public void testEvalReturnString() {
|
||||
|
||||
@@ -42,6 +42,18 @@ public class LettuceConnectionPipelineTxIntegrationTests extends
|
||||
super.testRestoreExistingKey();
|
||||
}
|
||||
|
||||
@Test(expected=RedisPipelineException.class)
|
||||
@IfProfileValue(name = "redisVersion", value = "2.6")
|
||||
public void testEvalArrayScriptError() {
|
||||
super.testEvalArrayScriptError();
|
||||
}
|
||||
|
||||
@Test(expected=RedisPipelineException.class)
|
||||
@IfProfileValue(name = "redisVersion", value = "2.6")
|
||||
public void testEvalShaArrayError() {
|
||||
super.testEvalShaArrayError();
|
||||
}
|
||||
|
||||
protected void initConnection() {
|
||||
connection.openPipeline();
|
||||
connection.multi();
|
||||
|
||||
@@ -89,6 +89,18 @@ public class SrpConnectionPipelineTxIntegrationTests extends SrpConnectionTransa
|
||||
super.testRestoreBadData();
|
||||
}
|
||||
|
||||
@Test(expected=RedisPipelineException.class)
|
||||
@IfProfileValue(name = "redisVersion", value = "2.6")
|
||||
public void testEvalArrayScriptError() {
|
||||
super.testEvalArrayScriptError();
|
||||
}
|
||||
|
||||
@Test(expected=RedisPipelineException.class)
|
||||
@IfProfileValue(name = "redisVersion", value = "2.6")
|
||||
public void testEvalShaArrayError() {
|
||||
super.testEvalShaArrayError();
|
||||
}
|
||||
|
||||
protected void initConnection() {
|
||||
connection.openPipeline();
|
||||
connection.multi();
|
||||
|
||||
Reference in New Issue
Block a user