This is an automated email from the ASF dual-hosted git repository.
rzo1 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/storm.git
The following commit(s) were added to refs/heads/master by this push:
new 7466ae3fa Make storm more windows friendly (#8699)
7466ae3fa is described below
commit 7466ae3fa4850d97da1ae4978f297bd80b444f38
Author: Dávid Szigecsán <[email protected]>
AuthorDate: Thu May 21 11:12:24 2026 +0200
Make storm more windows friendly (#8699)
* Change hardcoded temp dir creation OS independent
* Disable test cases on windows where "UnsupportedOperation Getting user
groups is not supported on Windows" was thrown.
---
.../test/jvm/org/apache/storm/security/auth/AutoSSLTest.java | 5 +----
.../apache/storm/security/auth/ShellBasedGroupsMappingTest.java | 5 +++++
.../storm/security/auth/authorizer/SimpleACLAuthorizerTest.java | 5 +++++
.../src/test/java/org/apache/storm/security/auth/AuthTest.java | 7 +++++++
4 files changed, 18 insertions(+), 4 deletions(-)
diff --git
a/storm-client/test/jvm/org/apache/storm/security/auth/AutoSSLTest.java
b/storm-client/test/jvm/org/apache/storm/security/auth/AutoSSLTest.java
index 19c749d56..d50354908 100644
--- a/storm-client/test/jvm/org/apache/storm/security/auth/AutoSSLTest.java
+++ b/storm-client/test/jvm/org/apache/storm/security/auth/AutoSSLTest.java
@@ -79,10 +79,7 @@ public class AutoSSLTest {
Files.write(temp.toPath(), lines, StandardCharsets.UTF_8);
File baseDir = null;
try {
- baseDir = new File("/tmp/autossl-test-" + UUID.randomUUID());
- if (!baseDir.mkdir()) {
- throw new IOException("failed to create base directory");
- }
+ baseDir = Files.createTempDirectory("autossl-test").toFile();
AutoSSL assl = new TestAutoSSL(baseDir.getPath());
LOG.debug("base dir is; " + baseDir);
diff --git
a/storm-client/test/jvm/org/apache/storm/security/auth/ShellBasedGroupsMappingTest.java
b/storm-client/test/jvm/org/apache/storm/security/auth/ShellBasedGroupsMappingTest.java
index bbf7a2edd..60920b0a9 100644
---
a/storm-client/test/jvm/org/apache/storm/security/auth/ShellBasedGroupsMappingTest.java
+++
b/storm-client/test/jvm/org/apache/storm/security/auth/ShellBasedGroupsMappingTest.java
@@ -26,6 +26,8 @@ import org.apache.storm.utils.Time;
import org.apache.storm.utils.Time.SimulatedTime;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.contains;
@@ -57,6 +59,7 @@ public class ShellBasedGroupsMappingTest {
}
@Test
+ @DisabledOnOs(OS.WINDOWS)
public void testCanGetGroups() throws Exception {
try (SimulatedTime ignored = new SimulatedTime()) {
groupsMapping.prepare(topoConf);
@@ -69,6 +72,7 @@ public class ShellBasedGroupsMappingTest {
}
@Test
+ @DisabledOnOs(OS.WINDOWS)
public void testWillCacheGroups() throws Exception {
try (SimulatedTime ignored = new SimulatedTime()) {
groupsMapping.prepare(topoConf);
@@ -82,6 +86,7 @@ public class ShellBasedGroupsMappingTest {
}
@Test
+ @DisabledOnOs(OS.WINDOWS)
public void testWillExpireCache() throws Exception {
try (SimulatedTime ignored = new SimulatedTime()) {
groupsMapping.prepare(topoConf);
diff --git
a/storm-client/test/jvm/org/apache/storm/security/auth/authorizer/SimpleACLAuthorizerTest.java
b/storm-client/test/jvm/org/apache/storm/security/auth/authorizer/SimpleACLAuthorizerTest.java
index 96caffafc..15f4b9bbe 100644
---
a/storm-client/test/jvm/org/apache/storm/security/auth/authorizer/SimpleACLAuthorizerTest.java
+++
b/storm-client/test/jvm/org/apache/storm/security/auth/authorizer/SimpleACLAuthorizerTest.java
@@ -18,6 +18,8 @@ import
org.apache.storm.security.auth.IGroupMappingServiceProvider;
import org.apache.storm.security.auth.ReqContext;
import org.apache.storm.utils.ConfigUtils;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
import javax.security.auth.Subject;
import java.security.Principal;
@@ -34,6 +36,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
public class SimpleACLAuthorizerTest {
@Test
+ @DisabledOnOs(OS.WINDOWS)
public void SimpleACLUserAuthTest() {
Map<String, Object> clusterConf = ConfigUtils.readStormConfig();
Collection<String> adminUserSet = new
HashSet<>(Collections.singletonList("admin"));
@@ -196,6 +199,7 @@ public class SimpleACLAuthorizerTest {
}
@Test
+ @DisabledOnOs(OS.WINDOWS)
public void SimpleACLNimbusUserAuthTest() {
Map<String, Object> clusterConf = ConfigUtils.readStormConfig();
Collection<String> adminUserSet = new
HashSet<>(Collections.singletonList("admin"));
@@ -222,6 +226,7 @@ public class SimpleACLAuthorizerTest {
}
@Test
+ @DisabledOnOs(OS.WINDOWS)
public void SimpleACLTopologyReadOnlyUserAuthTest() {
Map<String, Object> clusterConf = ConfigUtils.readStormConfig();
diff --git
a/storm-server/src/test/java/org/apache/storm/security/auth/AuthTest.java
b/storm-server/src/test/java/org/apache/storm/security/auth/AuthTest.java
index 2720da049..cc2e4acae 100644
--- a/storm-server/src/test/java/org/apache/storm/security/auth/AuthTest.java
+++ b/storm-server/src/test/java/org/apache/storm/security/auth/AuthTest.java
@@ -45,6 +45,8 @@ import org.apache.storm.utils.NimbusClient;
import org.apache.storm.utils.Time;
import org.apache.storm.utils.Utils;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -401,6 +403,7 @@ public class AuthTest {
}
@Test
+ @DisabledOnOs(OS.WINDOWS)
public void simpleAclUserAuthTest() {
Map<String, Object> clusterConf = ConfigUtils.readStormConfig();
clusterConf.put(Config.NIMBUS_ADMINS,
Collections.singletonList("admin"));
@@ -489,6 +492,7 @@ public class AuthTest {
}
@Test
+ @DisabledOnOs(OS.WINDOWS)
public void simpleAclNimbusUsersAuthTest() {
Map<String, Object> clusterConf = ConfigUtils.readStormConfig();
clusterConf.put(Config.NIMBUS_ADMINS,
Collections.singletonList("admin"));
@@ -546,6 +550,7 @@ public class AuthTest {
}
@Test
+ @DisabledOnOs(OS.WINDOWS)
public void simpleAclSameUserAuthTest() {
Map<String, Object> clusterConf = ConfigUtils.readStormConfig();
clusterConf.put(Config.NIMBUS_ADMINS,
Collections.singletonList("admin"));
@@ -575,6 +580,7 @@ public class AuthTest {
}
@Test
+ @DisabledOnOs(OS.WINDOWS)
public void shellBaseGroupsMappingTest() throws Exception {
Map<String, Object> clusterConf = ConfigUtils.readStormConfig();
ShellBasedGroupsMapping groups = new ShellBasedGroupsMapping();
@@ -595,6 +601,7 @@ public class AuthTest {
}
@Test
+ @DisabledOnOs(OS.WINDOWS)
public void impersonationAuthorizerTest() throws Exception {
final String impersonatingUser = "admin";
final String userBeingImpersonated = System.getProperty("user.name");