use of org.pentaho.di.engine.api.events.LogEvent in project pentaho-kettle by pentaho.
the class MessageEventServiceTest method testOperationFireEventThrowException.
@Test(expected = MessageEventFireEventException.class)
public void testOperationFireEventThrowException() throws KettleException {
addHandlers(operationMessageEvent, messageEventHandler, messageEventHandler2);
doThrow(new RuntimeException("Test")).when(messageEventHandler).execute(any(Message.class));
LogEvent logEvent = new LogEvent<>(new RemoteSource(ModelType.OPERATION, "Operation_ID"), logEntry);
messageEventService.fireEvent(logEvent);
verify(messageEventHandler, never()).execute(logEvent);
verify(messageEventHandler2).execute(logEvent);
}
use of org.pentaho.di.engine.api.events.LogEvent in project pentaho-kettle by pentaho.
the class MessageEventServiceTest method testTransformationFireEvent.
@Test
public void testTransformationFireEvent() throws Exception {
addHandlers(transformationMessageEvent, messageEventHandler, messageEventHandler2);
LogEvent logEvent = new LogEvent<>(new RemoteSource(ModelType.TRANSFORMATION, "Operation_ID"), logEntry);
messageEventService.fireEvent(logEvent);
verify(messageEventHandler).execute(logEvent);
verify(messageEventHandler2).execute(logEvent);
}
use of org.pentaho.di.engine.api.events.LogEvent in project pentaho-kettle by pentaho.
the class MessageEventServiceTest method testOperationFireEvent.
@Test
public void testOperationFireEvent() throws KettleException {
addHandlers(operationMessageEvent, messageEventHandler, messageEventHandler2);
LogEvent logEvent = new LogEvent<>(new RemoteSource(ModelType.OPERATION, "Operation_ID"), logEntry);
messageEventService.fireEvent(logEvent);
verify(messageEventHandler).execute(logEvent);
verify(messageEventHandler2).execute(logEvent);
}
Aggregations