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

    https://github.com/apache/spark/pull/15009#discussion_r114173117
  
    --- Diff: 
resource-managers/yarn/src/test/scala/org/apache/spark/deploy/yarn/YarnClusterSuite.scala
 ---
    @@ -201,6 +192,69 @@ class YarnClusterSuite extends BaseYarnClusterSuite {
         finalState should be (SparkAppHandle.State.FAILED)
       }
     
    +  test("monitor app running in thread using launcher library") {
    +    var handle : SparkAppHandle = null
    +    try {
    +      handle = launchSparkAppWithConf(true, false, "cluster")
    +      handle.stop()
    +
    +      eventually(timeout(30 seconds), interval(100 millis)) {
    +        handle.getState() should be (SparkAppHandle.State.KILLED)
    +      }
    +    } finally {
    +      handle.kill()
    +    }
    +  }
    +
    +  test("monitor app using launcher library for proc with auto shutdown") {
    +    var handle : SparkAppHandle = null
    +    try {
    +      handle = launchSparkAppWithConf(false, true, "cluster")
    +      handle.disconnect()
    +      val applicationId = ConverterUtils.toApplicationId(handle.getAppId)
    +      val yarnClient: YarnClient = getYarnClient
    +      eventually(timeout(30 seconds), interval(100 millis)) {
    +        handle.getState() should be (SparkAppHandle.State.LOST)
    +        var status = 
yarnClient.getApplicationReport(applicationId).getFinalApplicationStatus()
    +        status should be (FinalApplicationStatus.KILLED)
    +      }
    +    } finally {
    +      handle.kill()
    +    }
    +  }
    +
    +  test("monitor app using launcher library for thread with auto shutdown") 
{
    +    var handle = launchSparkAppWithConf(true, true, "cluster")
    --- End diff --
    
    `val`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to