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-vfs.git
The following commit(s) were added to refs/heads/master by this push:
new 5b152685e Disable HDFS tests on Java 23 and above
5b152685e is described below
commit 5b152685e963f77fe7a788ab1be2cce808b567d5
Author: Gary Gregory <[email protected]>
AuthorDate: Wed Nov 5 08:37:42 2025 -0500
Disable HDFS tests on Java 23 and above
java.lang.UnsupportedOperationException: getSubject is not supported
at
java.base/javax.security.auth.Subject.getSubject(Subject.java:277)
at
org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:588)
at
org.apache.hadoop.hdfs.server.namenode.FSNamesystem.<init>(FSNamesystem.java:887)
at
org.apache.hadoop.hdfs.server.namenode.FSNamesystem.<init>(FSNamesystem.java:851)
at
org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:1396)
at
org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:495)
at
org.apache.hadoop.hdfs.DFSTestUtil.formatNameNode(DFSTestUtil.java:256)
at
org.apache.hadoop.hdfs.MiniDFSCluster.configureNameService(MiniDFSCluster.java:1158)
at
org.apache.hadoop.hdfs.MiniDFSCluster.createNameNodesAndSetConf(MiniDFSCluster.java:1042)
at
org.apache.hadoop.hdfs.MiniDFSCluster.initMiniDFSCluster(MiniDFSCluster.java:974)
at
org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.java:594)
at
org.apache.hadoop.hdfs.MiniDFSCluster$Builder.build(MiniDFSCluster.java:533)
at
org.apache.commons.vfs2.provider.hdfs.HdfsFileProviderTest.setUp(HdfsFileProviderTest.java:128)
---
.../commons/vfs2/provider/hdfs/HdfsFileProviderTest.java | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git
a/commons-vfs2-hdfs/src/test/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileProviderTest.java
b/commons-vfs2-hdfs/src/test/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileProviderTest.java
index 2d9e62afc..dd2870a29 100644
---
a/commons-vfs2-hdfs/src/test/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileProviderTest.java
+++
b/commons-vfs2-hdfs/src/test/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileProviderTest.java
@@ -22,6 +22,7 @@ import static
org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assumptions.assumeTrue;
import java.io.BufferedReader;
import java.io.File;
@@ -30,6 +31,7 @@ import java.io.InputStreamReader;
import java.util.Map;
import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang3.JavaVersion;
import org.apache.commons.lang3.SystemUtils;
import org.apache.commons.vfs2.FileObject;
import org.apache.commons.vfs2.FileSystemException;
@@ -47,16 +49,14 @@ import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.condition.DisabledOnOs;
-import org.junit.jupiter.api.condition.OS;
/**
* This test class uses the Hadoop MiniDFSCluster class to create an embedded
Hadoop cluster.
- * <P>
+ * <p>
* This will only work on systems that Hadoop supports.
+ * </p>
*/
@SuppressWarnings("resource")
-@DisabledOnOs(value = OS.WINDOWS)
public class HdfsFileProviderTest {
// Turn off the MiniDFSCluster logging
@@ -108,6 +108,7 @@ public class HdfsFileProviderTest {
@BeforeAll
public static void setUp() throws Exception {
+ assumeTrue(SystemUtils.isJavaVersionAtMost(JavaVersion.JAVA_22));
System.setProperty("test.basedir",
"../commons-vfs2/target/test-classes/test-data");
Logger.getRootLogger().setLevel(Level.ERROR);
@@ -140,7 +141,9 @@ public class HdfsFileProviderTest {
if (null != hdfs) {
hdfs.close();
}
- manager.close();
+ if (manager != null) {
+ manager.close();
+ }
}
@AfterEach