diff --git a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderRestartTest.java b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderRestartTest.java index 1c1b2e26109..87945f909bb 100644 --- a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderRestartTest.java +++ b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderRestartTest.java @@ -16,14 +16,14 @@ */ package org.apache.logging.log4j.core.appender.rolling; +import static junit.framework.Assert.fail; import static org.apache.logging.log4j.core.test.hamcrest.Descriptors.that; import static org.apache.logging.log4j.core.test.hamcrest.FileMatchers.hasName; import static org.hamcrest.Matchers.endsWith; import static org.hamcrest.Matchers.hasItemInArray; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.junit.jupiter.api.Assertions.fail; -import static org.junit.jupiter.api.Assumptions.assumeTrue; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assume.assumeTrue; import java.io.File; import java.io.IOException; @@ -100,7 +100,7 @@ public void testAppender() throws Exception { Thread.yield(); final String name = "RollingFile"; final RollingFileAppender appender = loggerContextRule.getAppender(name); - assertNotNull(appender, name); + assertNotNull(name, appender); if (appender.getManager().getSemaphore().tryAcquire(5, TimeUnit.SECONDS)) { // If we are in here, either the rollover is done or has not taken place yet. validate(); @@ -114,7 +114,7 @@ private void validate() { final File[] files = DIR.toFile().listFiles(); Arrays.sort(files); assertTrue( - hasGzippedFile.matches(files), - () -> "was expecting files with '.gz' suffix, found: " + Arrays.toString(files)); + "was expecting files with '.gz' suffix, found: " + Arrays.toString(files), + hasGzippedFile.matches(files)); } }