Commit 0439b393 authored by Dave Syer's avatar Dave Syer

Fix some broken tests in empty new environments

parent 4c14f6f6
......@@ -110,8 +110,7 @@ public class LoggingApplicationListenerTests {
String output = this.outputCapture.toString().trim();
assertTrue("Wrong output:\n" + output, output.contains("Hello world"));
assertFalse("Wrong output:\n" + output, output.contains("???"));
assertTrue("Wrong output:\n" + output,
output.startsWith(tmpDir() + "/spring.log"));
assertTrue("Wrong output:\n" + output, output.startsWith(tmpDir() + "/tmp.log"));
}
@Test
......@@ -157,7 +156,7 @@ public class LoggingApplicationListenerTests {
Log logger = LogFactory.getLog(LoggingApplicationListenerTests.class);
logger.info("Hello world");
String output = this.outputCapture.toString().trim();
assertTrue("Wrong output:\n" + output, output.startsWith("target/foo/spring.log"));
assertTrue("Wrong output:\n" + output, output.startsWith("target/foo/tmp.log"));
}
@Test
......
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<property name="LOG_FILE" value="${LOG_FILE:-${LOG_PATH:-/tmp/}spring.log}"/>
<property name="LOG_FILE" value="${LOG_FILE:-${LOG_PATH:-${java.io.tmpdir:-/tmp}/}tmp.log}"/>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${LOG_FILE} [%t] ${PID:-????} %c{1}: %m%n</pattern>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment