From 761c985337778b2d45cea9748def828279bf2cbf Mon Sep 17 00:00:00 2001 From: izeye Date: Fri, 26 Jun 2015 13:47:02 +0900 Subject: [PATCH 1/2] Remove unnecessary `@After` callback `@After` callback was trying to remove the wrong file anyway. This is now taken care of by the `TemporaryFolder` rule. Closes gh-3335 --- .../boot/actuate/endpoint/mvc/LogFileMvcEndpointTests.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/LogFileMvcEndpointTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/LogFileMvcEndpointTests.java index 50055074eed..3c2375f3578 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/LogFileMvcEndpointTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/LogFileMvcEndpointTests.java @@ -62,11 +62,6 @@ public class LogFileMvcEndpointTests { this.mvc.setEnvironment(this.environment); } - @After - public void after() { - new File("test.log").delete(); - } - @Test public void notAvailableWithoutLogFile() throws IOException { assertThat(this.mvc.available().getStatusCode(), equalTo(HttpStatus.NOT_FOUND)); From 12767a43e24878ff2b4f4f7421da51239a7604a4 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 26 Jun 2015 08:24:49 +0200 Subject: [PATCH 2/2] Remove unnecessary import See gh-3335 --- .../boot/actuate/endpoint/mvc/LogFileMvcEndpointTests.java | 1 - 1 file changed, 1 deletion(-) diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/LogFileMvcEndpointTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/LogFileMvcEndpointTests.java index 3c2375f3578..63eb152c0ac 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/LogFileMvcEndpointTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/LogFileMvcEndpointTests.java @@ -21,7 +21,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; -import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.Test;