File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 2424import java .net .URISyntaxException ;
2525import java .nio .file .Files ;
2626import java .nio .file .Path ;
27+ import java .nio .file .attribute .FileTime ;
2728import java .util .concurrent .CountDownLatch ;
2829import org .apache .logging .log4j .Logger ;
2930import org .apache .logging .log4j .core .LoggerContext ;
@@ -64,6 +65,13 @@ static void beforeEach() throws Exception {
6465 Path .of (requireNonNull (RollingAppenderCronTest .class .getResource ("RollingAppenderCronTest.old.xml" ))
6566 .toURI ());
6667 Files .copy (src , CONFIG , REPLACE_EXISTING );
68+ // Set modification time to the start of the epoch, in order for modification detection to work on every OS.
69+ Files .setLastModifiedTime (CONFIG , FileTime .fromMillis (0L ));
70+ }
71+
72+ @ AfterAll
73+ static void cleanUp () throws Exception {
74+ Files .deleteIfExists (CONFIG );
6775 }
6876
6977 @ AfterAll
You can’t perform that action at this time.
0 commit comments