You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2024/08/30 12:30:21 UTC

(commons-io) branch master updated (3277a0753 -> d7905cf09)

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

ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git


    from 3277a0753 Bump github/codeql-action from 3.26.4 to 3.26.6 (#667)
     new fd05885f0 Javadoc
     new d7905cf09 Avoid random test failures

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/main/java/org/apache/commons/io/FileUtils.java            | 2 +-
 src/main/java/org/apache/commons/io/file/PathUtils.java       | 2 +-
 src/test/java/org/apache/commons/io/FileUtilsWaitForTest.java | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)


(commons-io) 01/02: Javadoc

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git

commit fd05885f00d471aa781c976ac1a934b18e79d662
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Aug 30 08:26:33 2024 -0400

    Javadoc
---
 src/main/java/org/apache/commons/io/FileUtils.java      | 2 +-
 src/main/java/org/apache/commons/io/file/PathUtils.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/commons/io/FileUtils.java b/src/main/java/org/apache/commons/io/FileUtils.java
index 2de1cc3cc..b4794b614 100644
--- a/src/main/java/org/apache/commons/io/FileUtils.java
+++ b/src/main/java/org/apache/commons/io/FileUtils.java
@@ -3113,7 +3113,7 @@ public class FileUtils {
     }
 
     /**
-     * Waits for the file system to propagate a file creation, with a timeout.
+     * Waits for the file system to detect a file's presence, with a timeout.
      * <p>
      * This method repeatedly tests {@link Files#exists(Path, LinkOption...)} until it returns
      * true up to the maximum time specified in seconds.
diff --git a/src/main/java/org/apache/commons/io/file/PathUtils.java b/src/main/java/org/apache/commons/io/file/PathUtils.java
index ce3ceca64..80fbedbca 100644
--- a/src/main/java/org/apache/commons/io/file/PathUtils.java
+++ b/src/main/java/org/apache/commons/io/file/PathUtils.java
@@ -1785,7 +1785,7 @@ public final class PathUtils {
     }
 
     /**
-     * Waits for the file system to propagate a file creation, with a timeout.
+     * Waits for the file system to detect a file's presence, with a timeout.
      * <p>
      * This method repeatedly tests {@link Files#exists(Path,LinkOption...)} until it returns true up to the maximum time given.
      * </p>


(commons-io) 02/02: Avoid random test failures

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git

commit d7905cf09ae010c1c2e5e8e008285fa8954e7f5d
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Aug 30 08:30:15 2024 -0400

    Avoid random test failures
---
 src/test/java/org/apache/commons/io/FileUtilsWaitForTest.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/test/java/org/apache/commons/io/FileUtilsWaitForTest.java b/src/test/java/org/apache/commons/io/FileUtilsWaitForTest.java
index ecd7b79fa..69a87e30b 100644
--- a/src/test/java/org/apache/commons/io/FileUtilsWaitForTest.java
+++ b/src/test/java/org/apache/commons/io/FileUtilsWaitForTest.java
@@ -37,13 +37,13 @@ import org.junit.jupiter.api.Timeout;
 public class FileUtilsWaitForTest {
 
     // Assume that this file does not exist
-    private final File NOSUCHFILE = new File("a.b.c.d."+System.currentTimeMillis());
+    private final File NOSUCHFILE = new File("a.b.c.d." + System.currentTimeMillis());
 
     @Test
     public void testIO_488() throws InterruptedException {
         final long start = System.currentTimeMillis();
         final AtomicBoolean wasInterrupted = new AtomicBoolean();
-        final int seconds = 3   ;
+        final int seconds = 3;
         final Thread thread1 = new Thread(() -> {
             // This will wait (assuming the file is not found)
             assertFalse(FileUtils.waitFor(NOSUCHFILE, seconds), "Should not find file");
@@ -55,7 +55,7 @@ public class FileUtilsWaitForTest {
         thread1.join();
         assertTrue(wasInterrupted.get(), "Should have been interrupted");
         final long elapsed = System.currentTimeMillis() - start;
-        assertTrue(elapsed >= seconds*1000, "Should wait for n seconds, actual: " + elapsed);
+        assertTrue(elapsed >= seconds * 1000, "Should wait for n seconds, actual: " + elapsed);
     }
 
     @Test
@@ -92,7 +92,7 @@ public class FileUtilsWaitForTest {
     }
 
     @Test
-    @Timeout(value = 30, unit = TimeUnit.MILLISECONDS) // Should complete quickly as the path is present
+    @Timeout(value = 300, unit = TimeUnit.MILLISECONDS) // Should complete quickly as the path is present
     public void testWaitForNegativeDuration() {
         assertTrue(FileUtils.waitFor(FileUtils.current(), -1));
     }