Github user jerryshao commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21290#discussion_r187852287
  
    --- Diff: 
core/src/test/scala/org/apache/spark/deploy/SparkSubmitSuite.scala ---
    @@ -180,6 +180,25 @@ class SparkSubmitSuite
         appArgs.toString should include ("thequeue")
       }
     
    +  test("SPARK-24241: not fail fast when executor num is 0 and dynamic 
allocation enabled") {
    +    val clArgs1 = Seq(
    +      "--name", "myApp",
    +      "--class", "Foo",
    +      "--num-executors", "0",
    +      "--conf", "spark.dynamicAllocation.enabled=true",
    +      "thejar.jar")
    +    val appArgs = new SparkSubmitArguments(clArgs1)
    +    appArgs.dynamicAllocationEnabled should be ("true")
    +
    +    val clArgs2 = Seq(
    +      "--name", "myApp",
    +      "--class", "Foo",
    +      "--num-executors", "0",
    +      "--conf", "spark.dynamicAllocation.enabled=false",
    +      "thejar.jar")
    +    intercept[SparkException](new SparkSubmitArguments(clArgs2))
    --- End diff --
    
    Also please add a exception message check for `intercept`.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to