Fix JedisConnection transaction discard
DATAREDIS-135
This commit is contained in:
@@ -365,7 +365,7 @@ public abstract class AbstractConnectionIntegrationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMulti() throws Exception {
|
||||
public void testMultiExec() throws Exception {
|
||||
byte[] key = "key".getBytes();
|
||||
byte[] value = "value".getBytes();
|
||||
|
||||
@@ -378,6 +378,18 @@ public abstract class AbstractConnectionIntegrationTests {
|
||||
assertEquals(new String(value), new String((byte[])results.get(1)));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMultiDiscard() throws Exception {
|
||||
connection.set("testitnow", "willdo");
|
||||
connection.multi();
|
||||
connection.set("testitnow", "notok");
|
||||
connection.discard();
|
||||
assertEquals("willdo", connection.get("testitnow"));
|
||||
// Ensure we can run a new tx after discarding previous one
|
||||
testMultiExec();
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testBlPopTimeout() {
|
||||
assertNull(connection.bLPop(1, "lclist"));
|
||||
|
||||
@@ -80,8 +80,14 @@ public class JRedisConnectionIntegrationTests extends AbstractConnectionIntegrat
|
||||
public void testBitSet() throws Exception {
|
||||
}
|
||||
|
||||
@Ignore
|
||||
public void testMulti() throws Exception {
|
||||
@Test(expected = UnsupportedOperationException.class)
|
||||
public void testMultiExec() throws Exception {
|
||||
super.testMultiExec();
|
||||
}
|
||||
|
||||
@Test(expected = UnsupportedOperationException.class)
|
||||
public void testMultiDiscard() throws Exception {
|
||||
super.testMultiDiscard();
|
||||
}
|
||||
|
||||
@Ignore
|
||||
|
||||
@@ -45,7 +45,7 @@ public class LettuceConnectionIntegrationTests extends AbstractConnectionIntegra
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMulti() throws Exception {
|
||||
public void testMultiExec() throws Exception {
|
||||
byte[] key = "key".getBytes();
|
||||
byte[] value = "value".getBytes();
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ public class RjcConnectionIntegrationTests extends AbstractConnectionIntegration
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMulti() throws Exception {
|
||||
public void testMultiExec() throws Exception {
|
||||
byte[] key = "key".getBytes();
|
||||
byte[] value = "value".getBytes();
|
||||
|
||||
|
||||
@@ -45,7 +45,11 @@ public class SrpConnectionIntegrationTests extends AbstractConnectionIntegration
|
||||
}
|
||||
|
||||
@Ignore("DATAREDIS-123, exec does not return command results")
|
||||
public void testMulti() throws Exception {
|
||||
public void testMultiExec() throws Exception {
|
||||
}
|
||||
|
||||
@Ignore("DATAREDIS-123, exec does not return command results")
|
||||
public void testMultiDiscard() {
|
||||
}
|
||||
|
||||
@Ignore("DATAREDIS-130, sort not working")
|
||||
|
||||
Reference in New Issue
Block a user