runzhiwang opened a new pull request #226: [LIVY-659]Fix travis failed on can 
kill spark-submit while it's running
   ## 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 
   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:

With regards,
Apache Git Services

Reply via email to