When in multi show a nice error if not using TransactionJedis
This commit is contained in:
@@ -8,6 +8,7 @@ import java.util.List;
|
||||
import org.junit.Test;
|
||||
|
||||
import redis.clients.jedis.Jedis;
|
||||
import redis.clients.jedis.JedisException;
|
||||
import redis.clients.jedis.Transaction;
|
||||
import redis.clients.jedis.TransactionBlock;
|
||||
|
||||
@@ -94,4 +95,10 @@ public class TransactionCommandsTest extends JedisCommandTestBase {
|
||||
expected.add("OK");
|
||||
assertEquals(expected, resp);
|
||||
}
|
||||
|
||||
@Test(expected = JedisException.class)
|
||||
public void validateWhenInMulti() {
|
||||
jedis.multi();
|
||||
jedis.ping();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user