You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by pk...@apache.org on 2023/01/23 18:20:03 UTC

[logging-log4j2] branch release-2.x updated: spotless:apply

This is an automated email from the ASF dual-hosted git repository.

pkarwasz pushed a commit to branch release-2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


The following commit(s) were added to refs/heads/release-2.x by this push:
     new ecfbe17807 spotless:apply
ecfbe17807 is described below

commit ecfbe17807339a17952ba09e49614d7fea55c716
Author: Piotr P. Karwasz <pi...@karwasz.org>
AuthorDate: Mon Jan 23 19:19:53 2023 +0100

    spotless:apply
---
 .../RollingAppenderCronAndSizeLookupTest.java      | 58 +++++++++++-----------
 1 file changed, 29 insertions(+), 29 deletions(-)

diff --git a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderCronAndSizeLookupTest.java b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderCronAndSizeLookupTest.java
index 392197c1d7..bd803f32d9 100644
--- a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderCronAndSizeLookupTest.java
+++ b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderCronAndSizeLookupTest.java
@@ -58,34 +58,34 @@ public class RollingAppenderCronAndSizeLookupTest {
         this.logger = loggerContextRule.getLogger(RollingAppenderCronAndSizeLookupTest.class.getName());
     }
 
-	@Test
-	public void testAppender() throws Exception {
-		Random rand = new Random();
-		// Loop for 500 times with a 5ms wait guarantees at least 2 time based rollovers.
-		for (int j=0; j < 500; ++j) {
-			for (int i = 0; i < 10; ++i) {
-				logger.debug("This is test message number " + i);
-			}
-			Thread.sleep(5);
-		}
-		Thread.sleep(50);
-		final File dir = new File(DIR);
-		assertTrue("Directory not created", dir.exists() && dir.listFiles().length > 0);
-		final File[] files = dir.listFiles();
-		Arrays.sort(files);
-		assertNotNull(files);
-		assertThat(files, hasItemInArray(that(hasName(that(endsWith(".log"))))));
-		int found = 0;
-		int fileCounter = 0;
-		String previous = "";
-		for (final File file: files) {
-			final String actual = file.getName();
-			if (previous.length() == 0) {
-				previous = actual;
-			} else {
-				assertNotSame("File names snould not be equal", previous, actual);
-			}
-		}
+    @Test
+    public void testAppender() throws Exception {
+        Random rand = new Random();
+        // Loop for 500 times with a 5ms wait guarantees at least 2 time based rollovers.
+        for (int j=0; j < 500; ++j) {
+            for (int i = 0; i < 10; ++i) {
+                logger.debug("This is test message number " + i);
+            }
+            Thread.sleep(5);
+        }
+        Thread.sleep(50);
+        final File dir = new File(DIR);
+        assertTrue("Directory not created", dir.exists() && dir.listFiles().length > 0);
+        final File[] files = dir.listFiles();
+        Arrays.sort(files);
+        assertNotNull(files);
+        assertThat(files, hasItemInArray(that(hasName(that(endsWith(".log"))))));
+        int found = 0;
+        int fileCounter = 0;
+        String previous = "";
+        for (final File file: files) {
+            final String actual = file.getName();
+            if (previous.length() == 0) {
+                previous = actual;
+            } else {
+                assertNotSame("File names snould not be equal", previous, actual);
+            }
+        }
 
-	}
+    }
 }