use of org.agrona.concurrent.errors.LoggingErrorHandler in project Aeron by real-logic.
the class CommonContextTest method setupErrorHandlerReturnsALoggingErrorHandlerInstanceIfNoUserErrorHandlerSupplied.
@Test
void setupErrorHandlerReturnsALoggingErrorHandlerInstanceIfNoUserErrorHandlerSupplied() {
final DistinctErrorLog distinctErrorLog = mock(DistinctErrorLog.class);
final ErrorHandler errorHandler = CommonContext.setupErrorHandler(null, distinctErrorLog);
assertNotNull(errorHandler);
final LoggingErrorHandler loggingErrorHandler = assertInstanceOf(LoggingErrorHandler.class, errorHandler);
assertSame(distinctErrorLog, loggingErrorHandler.distinctErrorLog());
}
use of org.agrona.concurrent.errors.LoggingErrorHandler in project aeron by real-logic.
the class CommonContextTest method setupErrorHandlerReturnsALoggingErrorHandlerInstanceIfNoUserErrorHandlerSupplied.
@Test
void setupErrorHandlerReturnsALoggingErrorHandlerInstanceIfNoUserErrorHandlerSupplied() {
final DistinctErrorLog distinctErrorLog = mock(DistinctErrorLog.class);
final ErrorHandler errorHandler = CommonContext.setupErrorHandler(null, distinctErrorLog);
assertNotNull(errorHandler);
final LoggingErrorHandler loggingErrorHandler = assertInstanceOf(LoggingErrorHandler.class, errorHandler);
assertSame(distinctErrorLog, loggingErrorHandler.distinctErrorLog());
}
Aggregations