You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2024/11/10 11:21:26 UTC
(maven-clean-plugin) branch assert created (now e578683)
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a change to branch assert
in repository https://gitbox.apache.org/repos/asf/maven-clean-plugin.git
at e578683 Clean up assertions
This branch includes the following new commits:
new e578683 Clean up assertions
The 1 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.
(maven-clean-plugin) 01/01: Clean up assertions
Posted by el...@apache.org.
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 <el...@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");
}
}