Skip to content

Commit fae3838

Browse files
committed
Merge remote-tracking branch 'apache/main' into feature/main/split-jul
2 parents 079f699 + 354e779 commit fae3838

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

log4j-script/src/test/java/org/apache/logging/log4j/script/appender/rolling/RollingAppenderDeleteScriptFri13thTest.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@
1818

1919
import static org.apache.logging.log4j.core.test.TestConstants.setSystemProperty;
2020
import static org.assertj.core.api.Assertions.assertThat;
21+
import static org.junit.Assume.assumeFalse;
2122

2223
import java.io.IOException;
2324
import java.io.UncheckedIOException;
2425
import java.nio.file.Files;
2526
import java.nio.file.Path;
27+
import java.time.DayOfWeek;
28+
import java.time.LocalDate;
2629
import java.util.concurrent.TimeUnit;
2730
import java.util.concurrent.atomic.AtomicLong;
2831
import java.util.concurrent.locks.LockSupport;
@@ -37,9 +40,6 @@
3740
import org.junit.Test;
3841
import org.junit.rules.RuleChain;
3942

40-
/**
41-
*
42-
*/
4343
public class RollingAppenderDeleteScriptFri13thTest {
4444

4545
private static final String CONFIG = "log4j-rolling-with-custom-delete-script-fri13th.xml";
@@ -58,6 +58,9 @@ public static void beforeClass() {
5858

5959
@Test
6060
public void testAppender() throws Exception {
61+
LocalDate now = LocalDate.now();
62+
// Ignore on Friday 13th
63+
assumeFalse(now.getDayOfWeek() == DayOfWeek.FRIDAY && now.getDayOfMonth() == 13);
6164
final var dir = Path.of(DIR);
6265
Files.createDirectories(dir);
6366
for (int i = 1; i <= 30; i++) {

0 commit comments

Comments
 (0)