[
https://issues.apache.org/jira/browse/HADOOP-19526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17948416#comment-17948416
]
ASF GitHub Bot commented on HADOOP-19526:
-----------------------------------------
stoty commented on code in PR #7567:
URL: https://github.com/apache/hadoop/pull/7567#discussion_r2068315273
##########
hadoop-tools/hadoop-distcp/src/test/java/org/apache/hadoop/tools/TestExternalCall.java:
##########
@@ -65,8 +66,12 @@ private static Configuration getConf() {
@BeforeEach
public void setup() {
- securityManager = System.getSecurityManager();
- System.setSecurityManager(new NoExitSecurityManager());
+ try {
+ securityManager = System.getSecurityManager();
+ System.setSecurityManager(new NoExitSecurityManager());
+ } catch (UnsupportedOperationException e) {
+ assumeTrue(false, "Test is skipped because SecurityManager cannot be set
(JEP 411)");
Review Comment:
Thanks for the review.
I've rewritten the test (and DistCp) to use the existing ExitUtil class,
@cnauroth .
> Skip tests in Hadoop common that depend on SecurityManager if the JVM does
> not support it
> -----------------------------------------------------------------------------------------
>
> Key: HADOOP-19526
> URL: https://issues.apache.org/jira/browse/HADOOP-19526
> Project: Hadoop Common
> Issue Type: Improvement
> Reporter: Istvan Toth
> Assignee: Istvan Toth
> Priority: Major
> Labels: pull-request-available
>
> TestExternalCall fails when SecurityManager cannot be set, we need to skip it
> on thos JVMs.
> TestGridmixSubmission has already been rewritten to use ExitUtil, we just
> need to remove the leftover SecurityManager calls.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]