Search in sources :

Example 1 with RedisEventListener

use of org.apache.rocketmq.connect.redis.processor.RedisEventListener in project rocketmq-externals by apache.

the class ListenerTest method testEventListenerRetry2.

@Test
public void testEventListenerRetry2() {
    Config config = getConfig();
    RedisEventProcessor processor = getExceptionProcessor(config);
    EventListener eventListener = new RedisEventListener(config, processor);
    KeyValuePair pair = new KeyStringValueString();
    eventListener.onEvent(null, pair);
}
Also used : RedisEventProcessor(org.apache.rocketmq.connect.redis.processor.RedisEventProcessor) DefaultRedisEventProcessor(org.apache.rocketmq.connect.redis.processor.DefaultRedisEventProcessor) KeyValuePair(com.moilioncircle.redis.replicator.rdb.datatype.KeyValuePair) Config(org.apache.rocketmq.connect.redis.common.Config) KeyStringValueString(com.moilioncircle.redis.replicator.rdb.datatype.KeyStringValueString) EventListener(com.moilioncircle.redis.replicator.event.EventListener) RedisEventListener(org.apache.rocketmq.connect.redis.processor.RedisEventListener) RedisEventListener(org.apache.rocketmq.connect.redis.processor.RedisEventListener) Test(org.junit.Test)

Example 2 with RedisEventListener

use of org.apache.rocketmq.connect.redis.processor.RedisEventListener in project rocketmq-externals by apache.

the class ListenerTest method testEventListenerConfigNull.

@Test
public void testEventListenerConfigNull() {
    Exception ex = null;
    try {
        new RedisEventListener(null, processor);
    } catch (IllegalArgumentException e) {
        ex = e;
    }
    Assert.assertNotNull(ex);
}
Also used : RedisEventListener(org.apache.rocketmq.connect.redis.processor.RedisEventListener) IOException(java.io.IOException) Test(org.junit.Test)

Example 3 with RedisEventListener

use of org.apache.rocketmq.connect.redis.processor.RedisEventListener in project rocketmq-externals by apache.

the class ListenerTest method testEventListenerRetry1.

@Test
public void testEventListenerRetry1() {
    Config config = getConfig();
    RedisEventProcessor processor = getFailedProcessor(config);
    EventListener eventListener = new RedisEventListener(config, processor);
    KeyValuePair pair = new KeyStringValueString();
    eventListener.onEvent(null, pair);
}
Also used : RedisEventProcessor(org.apache.rocketmq.connect.redis.processor.RedisEventProcessor) DefaultRedisEventProcessor(org.apache.rocketmq.connect.redis.processor.DefaultRedisEventProcessor) KeyValuePair(com.moilioncircle.redis.replicator.rdb.datatype.KeyValuePair) Config(org.apache.rocketmq.connect.redis.common.Config) KeyStringValueString(com.moilioncircle.redis.replicator.rdb.datatype.KeyStringValueString) EventListener(com.moilioncircle.redis.replicator.event.EventListener) RedisEventListener(org.apache.rocketmq.connect.redis.processor.RedisEventListener) RedisEventListener(org.apache.rocketmq.connect.redis.processor.RedisEventListener) Test(org.junit.Test)

Example 4 with RedisEventListener

use of org.apache.rocketmq.connect.redis.processor.RedisEventListener in project rocketmq-externals by apache.

the class ListenerTest method testEventListener.

@Test
public void testEventListener() {
    EventListener eventListener = new RedisEventListener(this.config, processor);
    KeyValuePair pair = new KeyStringValueString();
    eventListener.onEvent(null, pair);
}
Also used : KeyValuePair(com.moilioncircle.redis.replicator.rdb.datatype.KeyValuePair) KeyStringValueString(com.moilioncircle.redis.replicator.rdb.datatype.KeyStringValueString) EventListener(com.moilioncircle.redis.replicator.event.EventListener) RedisEventListener(org.apache.rocketmq.connect.redis.processor.RedisEventListener) RedisEventListener(org.apache.rocketmq.connect.redis.processor.RedisEventListener) Test(org.junit.Test)

Aggregations

RedisEventListener (org.apache.rocketmq.connect.redis.processor.RedisEventListener)4 Test (org.junit.Test)4 EventListener (com.moilioncircle.redis.replicator.event.EventListener)3 KeyStringValueString (com.moilioncircle.redis.replicator.rdb.datatype.KeyStringValueString)3 KeyValuePair (com.moilioncircle.redis.replicator.rdb.datatype.KeyValuePair)3 Config (org.apache.rocketmq.connect.redis.common.Config)2 DefaultRedisEventProcessor (org.apache.rocketmq.connect.redis.processor.DefaultRedisEventProcessor)2 RedisEventProcessor (org.apache.rocketmq.connect.redis.processor.RedisEventProcessor)2 IOException (java.io.IOException)1