You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@livy.apache.org by GitBox <gi...@apache.org> on 2019/09/05 00:34:14 UTC

[GitHub] [incubator-livy] runzhiwang opened a new pull request #226: [LIVY-659]Fix travis failed on can kill spark-submit while it's running

runzhiwang opened a new pull request #226: [LIVY-659]Fix travis failed on can kill spark-submit while it's running
URL: https://github.com/apache/incubator-livy/pull/226
 
 
   ## What changes were proposed in this pull request?
   
   Fix travis failed on "can kill spark-submit while it's running"
   
   The cause of failed is as follows:
   
   1. The test does not mock the method getApplicationReport of mockYarnClient, so yarnClient.getApplicationReport will return null.
   
   2. If the thread yarnAppMonitorThread run before the test executing app.kill(), yarnAppMonitorThread will throw NullPointerException when execute appReport.getDiagnostics.
   
   3. Then the NullPointerException was caught by yarnAppMonitorThread, and yarnAppMonitorThread changeState(SparkApp.State.FAILED).
   
   4. At last, the test execute app.kill(), but the app state is FAILED, so it won't execute process.foreach(_.destroy()), which cause verify(mockSparkSubmit, times(1)).destroy() failed.
   
   ## How was this patch tested?
   
   Existed UT and IT.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services