Add unit tests to Closeable
This commit is contained in:
@@ -8,6 +8,7 @@ import java.util.Map;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import redis.clients.jedis.BinaryJedis;
|
||||
import redis.clients.jedis.Jedis;
|
||||
import redis.clients.jedis.JedisShardInfo;
|
||||
import redis.clients.jedis.Protocol;
|
||||
@@ -91,4 +92,12 @@ public class JedisTest extends JedisCommandTestBase {
|
||||
assertEquals("PONG", jedis.ping());
|
||||
assertEquals("bar", jedis.get("foo"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void checkCloseable() {
|
||||
jedis.close();
|
||||
BinaryJedis bj = new BinaryJedis("localhost");
|
||||
bj.connect();
|
||||
bj.close();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user