This is an automated email from the ASF dual-hosted git repository.
olamy pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/maven-build-cache-extension.git
The following commit(s) were added to refs/heads/master by this push:
new dc41937 Use Junit annotations for os select (#454)
dc41937 is described below
commit dc4193782499c393584e66d4399aadafe8343eb9
Author: Olivier Lamy <[email protected]>
AuthorDate: Mon Feb 9 17:12:27 2026 +1000
Use Junit annotations for os select (#454)
Signed-off-by: Olivier Lamy <[email protected]>
---
.../apache/maven/buildcache/CacheUtilsPermissionsTest.java | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git
a/src/test/java/org/apache/maven/buildcache/CacheUtilsPermissionsTest.java
b/src/test/java/org/apache/maven/buildcache/CacheUtilsPermissionsTest.java
index 4f0d0ee..fe2a6ec 100644
--- a/src/test/java/org/apache/maven/buildcache/CacheUtilsPermissionsTest.java
+++ b/src/test/java/org/apache/maven/buildcache/CacheUtilsPermissionsTest.java
@@ -29,6 +29,8 @@
import java.util.Set;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
import org.junit.jupiter.api.io.TempDir;
import static org.junit.jupiter.api.Assertions.assertFalse;
@@ -50,11 +52,8 @@ class CacheUtilsPermissionsTest {
* cache correctness similar to how Git includes file mode in tree hashes.
*/
@Test
+ @DisabledOnOs(OS.WINDOWS)
void testPermissionsAffectFileHashWhenEnabled() throws IOException {
- // Skip test on non-POSIX filesystems (e.g., Windows)
- if
(!tempDir.getFileSystem().supportedFileAttributeViews().contains("posix")) {
- return;
- }
// Given: Same directory content with different permissions
Path sourceDir1 = tempDir.resolve("source1");
@@ -100,12 +99,8 @@ void testPermissionsAffectFileHashWhenEnabled() throws
IOException {
* the key point is that permission information is NOT deterministically
stored.
*/
@Test
+ @DisabledOnOs(OS.WINDOWS)
void testPermissionsDoNotAffectHashWhenDisabled() throws IOException {
- // Skip test on non-POSIX filesystems (e.g., Windows)
- if
(!tempDir.getFileSystem().supportedFileAttributeViews().contains("posix")) {
- return;
- }
-
// Given: Same directory content with different permissions
Path sourceDir1 = tempDir.resolve("source1");
Files.createDirectories(sourceDir1);