fix connection.setBit()
DATAREDIS-89
This commit is contained in:
@@ -58,8 +58,8 @@ public abstract class JedisUtils {
|
||||
|
||||
private static final String OK_CODE = "OK";
|
||||
private static final String OK_MULTI_CODE = "+OK";
|
||||
private static final byte[] ONE = new byte[] { 1 };
|
||||
private static final byte[] ZERO = new byte[] { 0 };
|
||||
private static final byte[] ONE = new byte[] { '1' };
|
||||
private static final byte[] ZERO = new byte[] { '0' };
|
||||
|
||||
/**
|
||||
* Converts the given, native Jedis exception to Spring's DAO hierarchy.
|
||||
|
||||
@@ -116,6 +116,15 @@ public abstract class AbstractConnectionIntegrationTests {
|
||||
assertEquals("PONG", connection.ping());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBitSet() throws Exception {
|
||||
String key = "bitset-test";
|
||||
connection.setBit(key, 0, false);
|
||||
connection.setBit(key, 1, true);
|
||||
assertTrue(!connection.getBit(key, 0));
|
||||
assertTrue(connection.getBit(key, 1));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInfo() throws Exception {
|
||||
Properties info = connection.info();
|
||||
|
||||
@@ -22,7 +22,6 @@ import org.junit.Test;
|
||||
import org.springframework.data.redis.SettingsUtils;
|
||||
import org.springframework.data.redis.connection.AbstractConnectionIntegrationTests;
|
||||
import org.springframework.data.redis.connection.RedisConnectionFactory;
|
||||
import org.springframework.data.redis.connection.jredis.JredisConnectionFactory;
|
||||
|
||||
public class JRedisConnectionIntegrationTests extends AbstractConnectionIntegrationTests {
|
||||
|
||||
@@ -86,6 +85,10 @@ public class JRedisConnectionIntegrationTests extends AbstractConnectionIntegrat
|
||||
|
||||
@Ignore
|
||||
public void testPubSubWithNamedChannels() {
|
||||
|
||||
}
|
||||
|
||||
@Ignore
|
||||
public void testBitSet() throws Exception {
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user