Make test results quieter

Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
master
Andrew DeMaria 5 years ago
parent 1a7bb68dc6
commit 85f85fd88c
No known key found for this signature in database
GPG Key ID: 0A3F5E91F8364EDF
  1. 10
      airsonic-main/src/test/java/org/airsonic/player/TestCaseUtils.java
  2. 4
      airsonic-main/src/test/resources/application.properties
  3. 1
      airsonic-main/src/test/resources/logback.xml

@ -4,6 +4,8 @@ import org.airsonic.player.controller.JAXBWriter;
import org.airsonic.player.dao.DaoHelper;
import org.airsonic.player.service.MediaScannerService;
import org.apache.commons.io.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@ -16,6 +18,8 @@ import java.util.stream.Collectors;
public class TestCaseUtils {
private static final Logger LOG = LoggerFactory.getLogger(TestCaseUtils.class);
private static File airsonicHomeDirForTest = null;
/**
@ -33,7 +37,7 @@ public class TestCaseUtils {
} catch (IOException e) {
throw new RuntimeException("Error while creating temporary AIRSONIC_HOME directory for tests");
}
System.out.println("AIRSONIC_HOME directory will be "+airsonicHomeDirForTest.getAbsolutePath());
LOG.info("AIRSONIC_HOME directory will be {}", airsonicHomeDirForTest.getAbsolutePath());
}
return airsonicHomeDirForTest.getAbsolutePath();
}
@ -53,11 +57,11 @@ public class TestCaseUtils {
File airsonicHomeDir = new File(airsonicHomePathForTest());
if (airsonicHomeDir.exists() && airsonicHomeDir.isDirectory()) {
System.out.println("Delete airsonic home (ie. "+airsonicHomeDir.getAbsolutePath()+").");
LOG.debug("Delete airsonic home (ie. {}).", airsonicHomeDir.getAbsolutePath());
try {
FileUtils.deleteDirectory(airsonicHomeDir);
} catch (IOException e) {
System.out.println("Error while deleting airsonic home.");
LOG.warn("Error while deleting airsonic home.");
e.printStackTrace();
throw e;
}

@ -2,8 +2,8 @@ spring.mvc.view.prefix: /WEB-INF/jsp/
spring.mvc.view.suffix: .jsp
server.error.includeStacktrace: ALWAYS
logging.level.root=WARN
logging.level.org.airsonic=INFO
logging.level.liquibase=INFO
logging.level.org.airsonic=WARN
logging.level.liquibase=WARN
logging.pattern.console=%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p){green} %clr(---){faint} %clr(%-40.40logger{32}){blue} %clr(:){faint} %m%n%wEx
logging.pattern.file=%d{yyyy-MM-dd HH:mm:ss.SSS} %5p --- %-40.40logger{32} : %m%n%wEx
DatabaseConfigType=legacy

@ -4,5 +4,4 @@
<appender-ref ref="CONSOLE" />
<appender-ref ref="FILE" />
</root>
<logger name="liquibase" level="ERROR" />
</configuration>
Loading…
Cancel
Save