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


The following commit(s) were added to refs/heads/master by this push:
     new 2fdc70b  Restore old test.
2fdc70b is described below

commit 2fdc70bd5549d8ce14120322eeab91ed0f5cbb05
Author: Gary Gregory <gardgreg...@gmail.com>
AuthorDate: Fri Aug 14 22:15:09 2020 -0400

    Restore old test.
---
 .../org/apache/commons/io/FileUtilsCleanDirectoryTestCase.java    | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git 
a/src/test/java/org/apache/commons/io/FileUtilsCleanDirectoryTestCase.java 
b/src/test/java/org/apache/commons/io/FileUtilsCleanDirectoryTestCase.java
index 940901a..c612efa 100644
--- a/src/test/java/org/apache/commons/io/FileUtilsCleanDirectoryTestCase.java
+++ b/src/test/java/org/apache/commons/io/FileUtilsCleanDirectoryTestCase.java
@@ -87,6 +87,10 @@ public class FileUtilsCleanDirectoryTestCase {
         try {
             // cleanDirectory calls forceDelete
             FileUtils.cleanDirectory(top);
+            fail("expected IOException");
+        } catch (final IOException e) {
+            assertEquals("Failed to list contents of " +
+                    top.getAbsolutePath(), e.getMessage());
         } finally {
             chmod(top, 755, false);
         }
@@ -103,6 +107,10 @@ public class FileUtilsCleanDirectoryTestCase {
         try {
             // cleanDirectory calls forceDelete
             FileUtils.cleanDirectory(top);
+            fail("expected IOException");
+        } catch (final IOException e) {
+            assertEquals("Unable to delete file: " +
+                    file.getAbsolutePath(), e.getMessage());
         } finally {
             chmod(top, 755, false);
         }

Reply via email to