Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[KYUUBI #5138][TEST] Fix flaky test BatchesResourceSuite - get batch …
…session list ### _Why are the changes needed?_ ``` override def afterEach(): Unit = { val sessionManager = fe.be.sessionManager.asInstanceOf[KyuubiSessionManager] sessionManager.allSessions().foreach { session => sessionManager.closeSession(session.handle) } // there is a chance that `KyuubiBatchService` do batch job submission during this phase // which causes the above cleanup can not catch all sessions. sessionManager.getBatchesFromMetadataStore(MetadataFilter(), 0, Int.MaxValue).foreach { batch => sessionManager.applicationManager.killApplication(ApplicationManagerInfo(None), batch.getId) sessionManager.cleanupMetadata(batch.getId) } } ``` ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [x] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request ### _Was this patch authored or co-authored using generative AI tooling?_ No. Closes #5246 from pan3793/5138. Closes #5138 a8d6837 [Cheng Pan] try catch 0c418b4 [Cheng Pan] [KYUUBI #5138][TEST] Fix flaky test BatchesResourceSuite - get batch session list Authored-by: Cheng Pan <[email protected]> Signed-off-by: Cheng Pan <[email protected]>
- Loading branch information