LuciferYang commented on code in PR #41806:
URL: https://github.com/apache/spark/pull/41806#discussion_r1250334834
##########
launcher/src/test/java/org/apache/spark/launcher/SparkSubmitCommandBuilderSuite.java:
##########
@@ -72,6 +72,36 @@ public void testCliHelpAndNoArg() throws Exception {
cmd.contains("org.apache.spark.deploy.SparkSubmit"));
}
+ @Test(expected = IllegalArgumentException.class)
+ public void testCheckJavaOptionsThrowException() throws Exception {
+ Map<String, String> env = new HashMap<>();
+ List<String> sparkSubmitArgs = Arrays.asList(
+ parser.MASTER,
Review Comment:
indentation: should be 2 space too
##########
launcher/src/test/java/org/apache/spark/launcher/SparkSubmitCommandBuilderSuite.java:
##########
@@ -72,6 +72,36 @@ public void testCliHelpAndNoArg() throws Exception {
cmd.contains("org.apache.spark.deploy.SparkSubmit"));
}
+ @Test(expected = IllegalArgumentException.class)
+ public void testCheckJavaOptionsThrowException() throws Exception {
+ Map<String, String> env = new HashMap<>();
+ List<String> sparkSubmitArgs = Arrays.asList(
+ parser.MASTER,
+ "local",
+ parser.DRIVER_CLASS_PATH,
+ "/driverCp",
+ parser.DRIVER_JAVA_OPTIONS,
+ "-Xmx64g -Dprop=Other -Dprop1=\"-Xmx -Xmx\" -Dprop2=\"-Xmx '-Xmx\"
" +
+ "-Dprop3='-Xmx -Xmx' -Dprop4='-Xmx \"-Xmx'",
+ SparkLauncher.NO_RESOURCE);
+ buildCommand(sparkSubmitArgs, env);
+ }
+
+ @Test
+ public void testCheckJavaOptions() throws Exception {
+ Map<String, String> env = new HashMap<>();
+ List<String> sparkSubmitArgs = Arrays.asList(
+ parser.MASTER,
Review Comment:
ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]