add JedisDataException and JedisConnectionException
This commit is contained in:
@@ -10,11 +10,11 @@ import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import redis.clients.jedis.Jedis;
|
||||
import redis.clients.jedis.JedisException;
|
||||
import redis.clients.jedis.Protocol;
|
||||
import redis.clients.jedis.Transaction;
|
||||
import redis.clients.jedis.TransactionBlock;
|
||||
import redis.clients.jedis.Protocol.Keyword;
|
||||
import redis.clients.jedis.exceptions.JedisDataException;
|
||||
|
||||
public class TransactionCommandsTest extends JedisCommandTestBase {
|
||||
final byte[] bfoo = { 0x01, 0x02, 0x03, 0x04 };
|
||||
@@ -27,7 +27,7 @@ public class TransactionCommandsTest extends JedisCommandTestBase {
|
||||
Jedis nj;
|
||||
|
||||
@Override
|
||||
@Before
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
@@ -84,7 +84,7 @@ public class TransactionCommandsTest extends JedisCommandTestBase {
|
||||
public void multiBlock() {
|
||||
List<Object> response = jedis.multi(new TransactionBlock() {
|
||||
@Override
|
||||
public void execute() {
|
||||
public void execute() {
|
||||
String status = sadd("foo", "a");
|
||||
assertEquals(Keyword.QUEUED.name(), status);
|
||||
|
||||
@@ -105,7 +105,7 @@ public class TransactionCommandsTest extends JedisCommandTestBase {
|
||||
// Binary
|
||||
response = jedis.multi(new TransactionBlock() {
|
||||
@Override
|
||||
public void execute() {
|
||||
public void execute() {
|
||||
String status = sadd(bfoo, ba);
|
||||
assertEquals(Keyword.QUEUED.name(), status);
|
||||
|
||||
@@ -195,7 +195,7 @@ public class TransactionCommandsTest extends JedisCommandTestBase {
|
||||
(byte[]) resp.get(0));
|
||||
}
|
||||
|
||||
@Test(expected = JedisException.class)
|
||||
@Test(expected = JedisDataException.class)
|
||||
public void validateWhenInMulti() {
|
||||
jedis.multi();
|
||||
jedis.ping();
|
||||
|
||||
Reference in New Issue
Block a user