Skip to content

Commit 8c01341

Browse files
committed
Switch to JUnit 4 assumptions
1 parent 7b92b6f commit 8c01341

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderRestartTest.java

+7-7
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
*/
1717
package org.apache.logging.log4j.core.appender.rolling;
1818

19+
import static junit.framework.Assert.fail;
1920
import static org.apache.logging.log4j.core.test.hamcrest.Descriptors.that;
2021
import static org.apache.logging.log4j.core.test.hamcrest.FileMatchers.hasName;
2122
import static org.hamcrest.Matchers.endsWith;
2223
import static org.hamcrest.Matchers.hasItemInArray;
23-
import static org.junit.jupiter.api.Assertions.assertNotNull;
24-
import static org.junit.jupiter.api.Assertions.assertTrue;
25-
import static org.junit.jupiter.api.Assertions.fail;
26-
import static org.junit.jupiter.api.Assumptions.assumeTrue;
24+
import static org.junit.Assert.assertNotNull;
25+
import static org.junit.Assert.assertTrue;
26+
import static org.junit.Assume.assumeTrue;
2727

2828
import java.io.File;
2929
import java.io.IOException;
@@ -100,7 +100,7 @@ public void testAppender() throws Exception {
100100
Thread.yield();
101101
final String name = "RollingFile";
102102
final RollingFileAppender appender = loggerContextRule.getAppender(name);
103-
assertNotNull(appender, name);
103+
assertNotNull(name, appender);
104104
if (appender.getManager().getSemaphore().tryAcquire(5, TimeUnit.SECONDS)) {
105105
// If we are in here, either the rollover is done or has not taken place yet.
106106
validate();
@@ -114,7 +114,7 @@ private void validate() {
114114
final File[] files = DIR.toFile().listFiles();
115115
Arrays.sort(files);
116116
assertTrue(
117-
hasGzippedFile.matches(files),
118-
() -> "was expecting files with '.gz' suffix, found: " + Arrays.toString(files));
117+
"was expecting files with '.gz' suffix, found: " + Arrays.toString(files),
118+
hasGzippedFile.matches(files));
119119
}
120120
}

0 commit comments

Comments
 (0)