use of org.apache.qpid.server.logging.EventLogger in project qpid-broker-j by apache.
the class BrokerFileLoggerStatusListenerTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
_fileLogger = mock(BrokerFileLogger.class);
_systemConfig = mock(SystemConfig.class);
EventLogger eventLogger = mock(EventLogger.class);
when(_systemConfig.getEventLogger()).thenReturn(eventLogger);
_statusListener = new BrokerFileLoggerImpl.BrokerFileLoggerStatusListener(_fileLogger, _systemConfig);
when(_fileLogger.getContextValue(Boolean.class, BrokerFileLogger.BROKER_FAIL_ON_LOGGER_IO_ERROR)).thenReturn(true);
}
use of org.apache.qpid.server.logging.EventLogger in project qpid-broker-j by apache.
the class NonJavaTrustStoreTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
when(_broker.getTaskExecutor()).thenReturn(_taskExecutor);
when(_broker.getChildExecutor()).thenReturn(_taskExecutor);
when(_broker.getModel()).thenReturn(_model);
when(_broker.getEventLogger()).thenReturn(new EventLogger());
when(((Broker) _broker).getCategoryClass()).thenReturn(Broker.class);
}
use of org.apache.qpid.server.logging.EventLogger in project qpid-broker-j by apache.
the class SiteSpecificTrustStoreTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
int connectTimeout = Integer.getInteger("SiteSpecificTrustStoreTest.connectTimeout", 1000);
int readTimeout = Integer.getInteger("SiteSpecificTrustStoreTest.readTimeout", 1000);
setTestSystemProperty(SiteSpecificTrustStore.TRUST_STORE_SITE_SPECIFIC_CONNECT_TIMEOUT, String.valueOf(connectTimeout));
setTestSystemProperty(SiteSpecificTrustStore.TRUST_STORE_SITE_SPECIFIC_READ_TIMEOUT, String.valueOf(readTimeout));
when(_broker.getTaskExecutor()).thenReturn(_taskExecutor);
when(_broker.getChildExecutor()).thenReturn(_taskExecutor);
when(_broker.getModel()).thenReturn(_model);
when(_broker.getEventLogger()).thenReturn(new EventLogger());
when(((Broker) _broker).getCategoryClass()).thenReturn(Broker.class);
}
use of org.apache.qpid.server.logging.EventLogger in project qpid-broker-j by apache.
the class FileTrustStoreTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
when(_broker.getTaskExecutor()).thenReturn(_taskExecutor);
when(_broker.getChildExecutor()).thenReturn(_taskExecutor);
when(_broker.getModel()).thenReturn(_model);
when(_broker.getCategoryClass()).thenReturn(Broker.class);
when(_broker.getEventLogger()).thenReturn(new EventLogger());
when(_broker.getTypeClass()).thenReturn(Broker.class);
}
use of org.apache.qpid.server.logging.EventLogger in project qpid-broker-j by apache.
the class BrokerFileLoggerTest method setUp.
@Before
public void setUp() throws Exception {
_taskExecutor = new TaskExecutorImpl();
_taskExecutor.start();
Model model = BrokerModel.getInstance();
EventLogger eventLogger = mock(EventLogger.class);
SystemConfig<?> systemConfig = mock(SystemConfig.class);
when(systemConfig.getModel()).thenReturn(model);
when(systemConfig.getChildExecutor()).thenReturn(_taskExecutor);
when(systemConfig.getEventLogger()).thenReturn(eventLogger);
doReturn(SystemConfig.class).when(systemConfig).getCategoryClass();
_broker = mock(Broker.class);
when(_broker.getModel()).thenReturn(model);
when(_broker.getChildExecutor()).thenReturn(_taskExecutor);
when(_broker.getParent()).thenReturn(systemConfig);
doReturn(Broker.class).when(_broker).getCategoryClass();
_baseFolder = new File(TMP_FOLDER, "test-sub-folder");
_logFile = new File(_baseFolder, "tmp-broker-host.log." + System.currentTimeMillis());
if (_baseFolder.exists()) {
FileUtils.delete(_baseFolder, true);
}
}
Aggregations