Fix some broken tests in empty new environments
This commit is contained in:
		
							parent
							
								
									4c14f6f685
								
							
						
					
					
						commit
						0439b39381
					
				| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
<?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>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue