Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LIVY-519][TEST] Fix travis failed on should kill yarn app
## What changes were proposed in this pull request? Fix travis failed on "should kill yarn app" The cause of failed is as follows: 1. When create SparkYarnApp, the yarnAppMonitorThread will be created, which change app state to Failed. Because before recent commit apache@a90f4fa, the pair <RUNNING: getYarnApplicationState, SUCCEEDED: getFinalApplicationStatus> which was mocked in test, but was not defined in mapYarnState, so the state of app will be changed to failed. 2. Then the test kills app, which will call killApplication when the app is running. However the app has been changed to failed in step 1, so killApplication won't be called, and verify(mockYarnClient).killApplication(appId) failed. 3. So if yarnAppMonitorThread changes app state before main thread kills app, the test will failed. If not, the test will succeed. 4. Though the recent commit apache@a90f4fa fixed the bug accidentally, it is necessary to ensure the app is running before kill app. ## How was this patch tested? Existed UT and IT. Author: runzhiwang <[email protected]> Closes apache#221 from runzhiwang/LIVY-519.
- Loading branch information