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 eab7b6b7a8c2005bc1889cfdf70f7a1d1e391a49 Author: Gary Gregory <gardgreg...@gmail.com> AuthorDate: Sun Sep 19 19:04:44 2021 -0400 Sort members. --- .../org/apache/commons/io/FileUtilsTestCase.java | 30 +++++++++++----------- .../org/apache/commons/io/input/TailerTest.java | 8 +++--- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/test/java/org/apache/commons/io/FileUtilsTestCase.java b/src/test/java/org/apache/commons/io/FileUtilsTestCase.java index 57f000a..6cf4ac7 100644 --- a/src/test/java/org/apache/commons/io/FileUtilsTestCase.java +++ b/src/test/java/org/apache/commons/io/FileUtilsTestCase.java @@ -184,6 +184,21 @@ public class FileUtilsTestCase { } } + private void createCircularOsSymLink(final String linkName, final String targetName) throws IOException { + if (FilenameUtils.isSystemWindows()) { + // Windows + try { + Runtime.getRuntime().exec("mklink /D " + linkName + " " + targetName); + } catch (final IOException ioe) { + // So that tests run in FAT filesystems don't fail + ioe.printStackTrace(); + } + } else { + // Not Windows, assume Linux + Runtime.getRuntime().exec("ln -s " + targetName + " " + linkName); + } + } + /** * May throw java.nio.file.FileSystemException: C:\Users\...\FileUtilsTestCase\cycle: A required privilege is not held * by the client. On Windows, you are fine if you run a terminal with admin karma. @@ -209,21 +224,6 @@ public class FileUtilsTestCase { assertTrue(Files.isSymbolicLink(linkPath), () -> "Expected a sym link here: " + linkName); } - private void createCircularOsSymLink(final String linkName, final String targetName) throws IOException { - if (FilenameUtils.isSystemWindows()) { - // Windows - try { - Runtime.getRuntime().exec("mklink /D " + linkName + " " + targetName); - } catch (final IOException ioe) { - // So that tests run in FAT filesystems don't fail - ioe.printStackTrace(); - } - } else { - // Not Windows, assume Linux - Runtime.getRuntime().exec("ln -s " + targetName + " " + linkName); - } - } - private void createFilesForTestCopyDirectory(final File grandParentDir, final File parentDir, final File childDir) throws Exception { final File childDir2 = new File(parentDir, "child2"); final File grandChildDir = new File(childDir, "grandChild"); diff --git a/src/test/java/org/apache/commons/io/input/TailerTest.java b/src/test/java/org/apache/commons/io/input/TailerTest.java index a220c35..2179fe9 100644 --- a/src/test/java/org/apache/commons/io/input/TailerTest.java +++ b/src/test/java/org/apache/commons/io/input/TailerTest.java @@ -60,10 +60,6 @@ import com.google.common.collect.Lists; */ public class TailerTest { - private static final int TEST_BUFFER_SIZE = 1024; - - private static final int TEST_DELAY_MILLIS = 1500; - private static class NonStandardTailable implements Tailer.Tailable { private final File file; @@ -188,6 +184,10 @@ public class TailerTest { } } + private static final int TEST_BUFFER_SIZE = 1024; + + private static final int TEST_DELAY_MILLIS = 1500; + @TempDir public static File temporaryFolder;