From d84554c710094d12f4bd786de7f31384694fe1e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Szigecs=C3=A1n?= Date: Wed, 20 May 2026 19:41:04 +0200 Subject: [PATCH 1/2] Change hardcoded temp dir creation OS independent --- .../test/jvm/org/apache/storm/security/auth/AutoSSLTest.java | 5 +---- 1 file changed, 1 insertion(+), 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 19c749d5608..d5035490862 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 void testpopulateCredentials() throws Exception { 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); From a8f33364061ac9270ad89022a723b370eb928c37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Szigecs=C3=A1n?= Date: Wed, 20 May 2026 20:08:06 +0200 Subject: [PATCH 2/2] Disable test cases on windows where "UnsupportedOperation Getting user groups is not supported on Windows" was thrown. --- .../storm/security/auth/ShellBasedGroupsMappingTest.java | 5 +++++ .../security/auth/authorizer/SimpleACLAuthorizerTest.java | 5 +++++ .../test/java/org/apache/storm/security/auth/AuthTest.java | 7 +++++++ 3 files changed, 17 insertions(+) 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 bbf7a2edde6..60920b0a958 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.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 void setUp() { } @Test + @DisabledOnOs(OS.WINDOWS) public void testCanGetGroups() throws Exception { try (SimulatedTime ignored = new SimulatedTime()) { groupsMapping.prepare(topoConf); @@ -69,6 +72,7 @@ public void testCanGetGroups() throws Exception { } @Test + @DisabledOnOs(OS.WINDOWS) public void testWillCacheGroups() throws Exception { try (SimulatedTime ignored = new SimulatedTime()) { groupsMapping.prepare(topoConf); @@ -82,6 +86,7 @@ public void testWillCacheGroups() throws Exception { } @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 96caffafc5f..15f4b9bbeed 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.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 @@ public class SimpleACLAuthorizerTest { @Test + @DisabledOnOs(OS.WINDOWS) public void SimpleACLUserAuthTest() { Map clusterConf = ConfigUtils.readStormConfig(); Collection adminUserSet = new HashSet<>(Collections.singletonList("admin")); @@ -196,6 +199,7 @@ public void SimpleACLUserAuthTest() { } @Test + @DisabledOnOs(OS.WINDOWS) public void SimpleACLNimbusUserAuthTest() { Map clusterConf = ConfigUtils.readStormConfig(); Collection adminUserSet = new HashSet<>(Collections.singletonList("admin")); @@ -222,6 +226,7 @@ public void SimpleACLNimbusUserAuthTest() { } @Test + @DisabledOnOs(OS.WINDOWS) public void SimpleACLTopologyReadOnlyUserAuthTest() { Map 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 2720da049e5..cc2e4acaee7 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.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 void positiveWhitelistAuthroizationTest() { } @Test + @DisabledOnOs(OS.WINDOWS) public void simpleAclUserAuthTest() { Map clusterConf = ConfigUtils.readStormConfig(); clusterConf.put(Config.NIMBUS_ADMINS, Collections.singletonList("admin")); @@ -489,6 +492,7 @@ public void simpleAclUserAuthTest() { } @Test + @DisabledOnOs(OS.WINDOWS) public void simpleAclNimbusUsersAuthTest() { Map clusterConf = ConfigUtils.readStormConfig(); clusterConf.put(Config.NIMBUS_ADMINS, Collections.singletonList("admin")); @@ -546,6 +550,7 @@ public void simpleAclNimbusGroupsAuthTest() { } @Test + @DisabledOnOs(OS.WINDOWS) public void simpleAclSameUserAuthTest() { Map clusterConf = ConfigUtils.readStormConfig(); clusterConf.put(Config.NIMBUS_ADMINS, Collections.singletonList("admin")); @@ -575,6 +580,7 @@ public void simpleAclSameUserAuthTest() { } @Test + @DisabledOnOs(OS.WINDOWS) public void shellBaseGroupsMappingTest() throws Exception { Map clusterConf = ConfigUtils.readStormConfig(); ShellBasedGroupsMapping groups = new ShellBasedGroupsMapping(); @@ -595,6 +601,7 @@ public void getTransportPluginThrowsRunimeTest() { } @Test + @DisabledOnOs(OS.WINDOWS) public void impersonationAuthorizerTest() throws Exception { final String impersonatingUser = "admin"; final String userBeingImpersonated = System.getProperty("user.name");