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

elharo pushed a commit to branch assert
in repository https://gitbox.apache.org/repos/asf/maven-clean-plugin.git

commit e5786831ae5b51ac83fdb9cefd8787ff25d55bcc
Author: Elliotte Rusty Harold <elh...@ibiblio.org>
AuthorDate: Sun Nov 10 06:20:25 2024 -0500

    Clean up assertions
---
 src/test/java/org/apache/maven/plugins/clean/CleanMojoTest.java | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/test/java/org/apache/maven/plugins/clean/CleanMojoTest.java 
b/src/test/java/org/apache/maven/plugins/clean/CleanMojoTest.java
index 5a5d0d4..78d2c28 100644
--- a/src/test/java/org/apache/maven/plugins/clean/CleanMojoTest.java
+++ b/src/test/java/org/apache/maven/plugins/clean/CleanMojoTest.java
@@ -52,7 +52,6 @@ import static org.junit.jupiter.api.Assertions.fail;
  */
 @MojoTest
 public class CleanMojoTest {
-    private static final String LOCAL_REPO = "target/local-repo/";
 
     /**
      * Tests the simple removal of directories
@@ -175,7 +174,7 @@ public class CleanMojoTest {
             mojo.execute();
             fail("Should fail to delete a file that is locked");
         } catch (MojoException expected) {
-            assertTrue(true);
+            assertNotNull(expected.getMessage());
         }
     }
 
@@ -199,9 +198,6 @@ public class CleanMojoTest {
         try (FileChannel channel = new RandomAccessFile(f, "rw").getChannel();
                 FileLock ignored = channel.lock()) {
             mojo.execute();
-            assertTrue(true);
-        } catch (MojoException expected) {
-            fail("Should display a warning when deleting a file that is 
locked");
         }
     }
 

Reply via email to