Skip to content

Commit 10c5c22

Browse files
committed
Disable test on Fri 13th
1 parent 5901dfb commit 10c5c22

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@
1919
import static org.junit.Assert.assertEquals;
2020
import static org.junit.Assert.assertFalse;
2121
import static org.junit.Assert.assertTrue;
22+
import static org.junit.Assume.assumeFalse;
2223

2324
import java.io.File;
25+
import java.time.DayOfWeek;
26+
import java.time.LocalDate;
2427
import org.apache.logging.log4j.Logger;
2528
import org.apache.logging.log4j.core.test.junit.LoggerContextRule;
2629
import org.apache.logging.log4j.core.util.Constants;
@@ -29,9 +32,6 @@
2932
import org.junit.Test;
3033
import org.junit.rules.RuleChain;
3134

32-
/**
33-
*
34-
*/
3535
public class RollingAppenderDeleteScriptFri13thTest {
3636

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

5151
@Test
5252
public void testAppender() throws Exception {
53+
LocalDate now = LocalDate.now();
54+
// Ignore on Friday 13th
55+
assumeFalse(now.getDayOfWeek() == DayOfWeek.FRIDAY && now.getDayOfMonth() == 13);
5356
final File dir = new File(DIR);
5457
dir.mkdirs();
5558
for (int i = 1; i <= 30; i++) {

0 commit comments

Comments
 (0)