use of org.finra.herd.core.helper.LogLevel in project herd by FINRAOS.
the class BusinessObjectDataInitiateDestroyHelperServiceImplTest method testExecuteS3SpecificStepsWithLoggerLevelSetToInfo.
@Test
public void testExecuteS3SpecificStepsWithLoggerLevelSetToInfo() {
String loggerName = BusinessObjectDataInitiateDestroyHelperServiceImpl.class.getName();
LogLevel origLoggerLevel = getLogLevel(loggerName);
setLogLevel(loggerName, LogLevel.INFO);
try {
runExecuteS3SpecificStepsTest();
} finally {
setLogLevel(loggerName, origLoggerLevel);
}
}
use of org.finra.herd.core.helper.LogLevel in project herd by FINRAOS.
the class DownloaderControllerTest method testPerformDownloadWithLoggerLevelSetToWarn.
@Test
public void testPerformDownloadWithLoggerLevelSetToWarn() throws Exception {
LogLevel origLoggerLevel = getLogLevel(DownloaderController.class);
setLogLevel(DownloaderController.class, LogLevel.WARN);
try {
runDownload();
} finally {
setLogLevel(DownloaderController.class, origLoggerLevel);
}
}
use of org.finra.herd.core.helper.LogLevel in project herd by FINRAOS.
the class UploaderControllerTest method testPerformUploadWithLoggerLevelSetToWarn.
@Test
public void testPerformUploadWithLoggerLevelSetToWarn() throws Exception {
LogLevel origLoggerLevel = getLogLevel(UploaderController.class);
setLogLevel(UploaderController.class, LogLevel.WARN);
try {
// Upload and register business object data parents.
uploadAndRegisterTestDataParents(uploaderWebClient);
runUpload(UploaderController.MIN_THREADS);
} finally {
setLogLevel(UploaderController.class, origLoggerLevel);
}
}
use of org.finra.herd.core.helper.LogLevel in project herd by FINRAOS.
the class UploaderControllerTest method testPerformUploadWithIoExceptionDuringUpdateBusinessObjectDataStatus.
@Test(expected = IOException.class)
public void testPerformUploadWithIoExceptionDuringUpdateBusinessObjectDataStatus() throws Exception {
// Turn off logging since this test will log a stack trace as a warning.
LogLevel originalLogLevel = getLogLevel(UploaderWebClient.class);
setLogLevel(UploaderWebClient.class, LogLevel.OFF);
try {
runUpload(UploaderController.MIN_THREADS, null, false, false, MockHttpClientOperationsImpl.HOSTNAME_THROW_IO_EXCEPTION_DURING_UPDATE_BDATA_STATUS, null);
} finally {
setLogLevel(UploaderWebClient.class, originalLogLevel);
}
}
use of org.finra.herd.core.helper.LogLevel in project herd by FINRAOS.
the class UploaderControllerTest method testPerformUploadWithInfoLoggingEnabled.
@Test
public void testPerformUploadWithInfoLoggingEnabled() throws Exception {
// Upload and register business object data parents.
uploadAndRegisterTestDataParents(uploaderWebClient);
// Get the logger and the current logger level.
LogLevel origLogLevel = getLogLevel(UploaderController.class);
// Set logging level to INFO.
setLogLevel(UploaderController.class, LogLevel.INFO);
// Run the upload and reset the logging level back to the original value.
try {
runUpload(UploaderController.MIN_THREADS);
} finally {
setLogLevel(UploaderController.class, origLogLevel);
}
}
Aggregations