[ 
https://issues.apache.org/jira/browse/HADOOP-19500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17935569#comment-17935569
 ] 

ASF GitHub Bot commented on HADOOP-19500:
-----------------------------------------

stoty commented on code in PR #7503:
URL: https://github.com/apache/hadoop/pull/7503#discussion_r1995617830


##########
hadoop-tools/hadoop-sls/src/test/java/org/apache/hadoop/yarn/sls/TestSLSDagAMSimulator.java:
##########
@@ -62,6 +66,8 @@ public static Collection<Object[]> data() {
 
   @Before
   public void setup() {
+    //JavaScript engine has been removed from Java in Java 15.
+    assumeNotNull(new ScriptEngineManager().getEngineByName("JavaScript"));

Review Comment:
   Thanks for the review @steveloughran .
   
   A utility class wouldn't really work because some of the tests use JUnit 4 
and others Junit 5.
   
   I have refactored the changes, and pushed the SLS check into the superclass, 
so that now there are only two assume instances, and a message is set.
   
   



##########
hadoop-tools/hadoop-sls/src/test/java/org/apache/hadoop/yarn/sls/TestSLSDagAMSimulator.java:
##########
@@ -28,9 +28,13 @@
 import org.junit.runners.Parameterized;
 import org.junit.runners.Parameterized.Parameters;
 
+import static org.junit.Assume.assumeNotNull;

Review Comment:
   Sure. 
   
   Is there an Eclipse code formatter definition somewhere I can use ?





> Skip tests that require JavaScript engine when it's not available
> -----------------------------------------------------------------
>
>                 Key: HADOOP-19500
>                 URL: https://issues.apache.org/jira/browse/HADOOP-19500
>             Project: Hadoop Common
>          Issue Type: Sub-task
>            Reporter: Istvan Toth
>            Priority: Major
>              Labels: pull-request-available
>
> Some features require a JavaScript engine, which has been removed from JDK.
> Skip those tests if JavaScript is not available.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to