use of org.apache.samza.runtime.ProcessorLifecycleListenerFactory in project samza by apache.
the class TestTaskApplicationDescriptorImpl method testProcessorLifecycleListener.
@Test
public void testProcessorLifecycleListener() {
ProcessorLifecycleListenerFactory mockFactory = mock(ProcessorLifecycleListenerFactory.class);
TaskApplication testApp = appDesc -> {
appDesc.withProcessorLifecycleListenerFactory(mockFactory);
};
TaskApplicationDescriptorImpl appDesc = new TaskApplicationDescriptorImpl(testApp, config);
assertEquals(appDesc.getProcessorLifecycleListenerFactory(), mockFactory);
}
use of org.apache.samza.runtime.ProcessorLifecycleListenerFactory in project samza by apache.
the class TestStreamApplicationDescriptorImpl method testProcessorLifecycleListenerFactory.
@Test
public void testProcessorLifecycleListenerFactory() {
ProcessorLifecycleListenerFactory mockFactory = mock(ProcessorLifecycleListenerFactory.class);
StreamApplication testApp = appSpec -> appSpec.withProcessorLifecycleListenerFactory(mockFactory);
StreamApplicationDescriptorImpl appDesc = new StreamApplicationDescriptorImpl(testApp, getConfig());
assertEquals(appDesc.getProcessorLifecycleListenerFactory(), mockFactory);
}
Aggregations