Fix SRP exception on select in transaction
DATAREDIS-220
This commit is contained in:
@@ -592,6 +592,7 @@ public class SrpConnection implements RedisConnection {
|
||||
try {
|
||||
if (isPipelined()) {
|
||||
pipeline(pipeline.select(dbIndex));
|
||||
return;
|
||||
}
|
||||
client.select(dbIndex);
|
||||
} catch (Exception ex) {
|
||||
|
||||
@@ -98,6 +98,12 @@ public abstract class AbstractConnectionIntegrationTests {
|
||||
connection = null;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSelect() {
|
||||
// Make sure this doesn't throw Exception
|
||||
connection.select(1);
|
||||
}
|
||||
|
||||
@Test
|
||||
@IfProfileValue(name = "runLongTests", value = "true")
|
||||
public void testExpire() throws Exception {
|
||||
|
||||
@@ -141,6 +141,11 @@ public class JedisConnectionPipelineIntegrationTests extends
|
||||
super.testZRevRangeByScoreWithScoresOffsetCount();
|
||||
}
|
||||
|
||||
@Test(expected = RedisSystemException.class)
|
||||
public void testSelect() {
|
||||
super.testSelect();
|
||||
}
|
||||
|
||||
// Overrides, usually due to return values being Long vs Boolean or Set vs
|
||||
// List
|
||||
|
||||
|
||||
@@ -274,6 +274,10 @@ public class JRedisConnectionIntegrationTests extends AbstractConnectionIntegrat
|
||||
super.testZRevRangeByScoreWithScoresOffsetCount();
|
||||
}
|
||||
|
||||
@Test(expected = UnsupportedOperationException.class)
|
||||
public void testSelect() {
|
||||
super.testSelect();
|
||||
}
|
||||
|
||||
// Jredis returns null for rPush
|
||||
@Test
|
||||
|
||||
@@ -123,7 +123,7 @@ public class LettuceConnectionIntegrationTests extends AbstractConnectionIntegra
|
||||
|
||||
@Test(expected = UnsupportedOperationException.class)
|
||||
public void testSelect() {
|
||||
connection.select(1);
|
||||
super.testSelect();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -60,6 +60,11 @@ public class LettuceConnectionPipelineIntegrationTests extends
|
||||
public void testMultiDiscard() {
|
||||
}
|
||||
|
||||
@Test(expected=UnsupportedOperationException.class)
|
||||
public void testSelect() {
|
||||
super.testSelect();
|
||||
}
|
||||
|
||||
// Overrides, usually due to return values being Long vs Boolean or Set vs
|
||||
// List
|
||||
|
||||
|
||||
Reference in New Issue
Block a user