use of com.moilioncircle.redis.replicator.rdb.datatype.KeyStringValueList in project rocketmq-externals by apache.
the class RedisEventHandlerTest method handlerTest.
private <T> KVEntry handlerTest(int rdbType, ValueSetter<T> setter) {
KVEntry res = null;
Exception ex = null;
Config config = getConfig();
RedisEventHandler handler = new DefaultRedisEventHandler(config);
KeyValuePair keyValuePair = new KeyStringValueList();
keyValuePair.setValueRdbType(rdbType);
keyValuePair.setKey("key".getBytes());
Object value = setter.getValue();
keyValuePair.setValue(value);
try {
res = handler.handleKVString(replId, offset, keyValuePair);
} catch (Exception e) {
e.printStackTrace();
ex = e;
}
Assert.assertNull(ex);
return res;
}
Aggregations