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

slachiewicz pushed a commit to branch maven-resolver-1.9.x
in repository https://gitbox.apache.org/repos/asf/maven-resolver.git


The following commit(s) were added to refs/heads/maven-resolver-1.9.x by this 
push:
     new 17c6eb1c9 [1.9.x] Let notExistsAndIsCreated test the creation of the 
directory
17c6eb1c9 is described below

commit 17c6eb1c9c8eac21bc560fde643778f2d83f232e
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Sat Nov 21 01:20:48 2026 +0100

    [1.9.x] Let notExistsAndIsCreated test the creation of the directory
    
    The test created the directory before calling resolveDirectory with 
mayCreate, so it never checked that the method creates it.
---
 .../src/test/java/org/eclipse/aether/util/DirectoryUtilsTest.java      | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/maven-resolver-util/src/test/java/org/eclipse/aether/util/DirectoryUtilsTest.java
 
b/maven-resolver-util/src/test/java/org/eclipse/aether/util/DirectoryUtilsTest.java
index 8691e008b..c23138b2b 100644
--- 
a/maven-resolver-util/src/test/java/org/eclipse/aether/util/DirectoryUtilsTest.java
+++ 
b/maven-resolver-util/src/test/java/org/eclipse/aether/util/DirectoryUtilsTest.java
@@ -31,6 +31,7 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.TestInfo;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.junit.jupiter.api.Assumptions.assumeTrue;
 
@@ -112,7 +113,7 @@ public class DirectoryUtilsTest {
         
Files.createDirectories(Paths.get(System.getProperty("java.io.tmpdir")));
 
         Path tmpDir = Files.createTempDirectory(testName);
-        Files.createDirectories(tmpDir.resolve("foo"));
+        assertFalse(Files.exists(tmpDir.resolve("foo")));
         Path result = DirectoryUtils.resolveDirectory("foo", tmpDir, true);
         assertEquals(tmpDir.resolve("foo"), result);
         assertTrue(Files.isDirectory(tmpDir.resolve("foo")));

Reply via email to