[KYUUBI #4807][FOLLOWUP] Fix flaky test "basic batch rest client"

### _Why are the changes needed?_

Using `eventually` to fix the flaky test.

### _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/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #4845 from turboFei/flaky_test_log.

Closes #4807

3f11bb048 [fwang12] Fix flaky test - basic batch rest client

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
This commit is contained in:
fwang12 2023-05-17 10:42:42 +08:00
parent 514a6a961a
commit b8ee006ca4

View File

@ -68,8 +68,10 @@ class BatchRestApiSuite extends RestClientTestHelper with BatchTestHelper {
assert(batch.getBatchType === "SPARK")
// get batch log
val log = batchRestApi.getBatchLocalLog(batch.getId(), 0, 1)
assert(log.getRowCount == 1)
eventually(timeout(1.minutes)) {
val log = batchRestApi.getBatchLocalLog(batch.getId(), 0, 1)
assert(log.getRowCount == 1)
}
// delete batch
val closeResp = batchRestApi.deleteBatch(batch.getId(), null)