This is an automated email from the ASF dual-hosted git repository.

feiwang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new b8ee006ca [KYUUBI #4807][FOLLOWUP] Fix flaky test  "basic batch rest 
client"
b8ee006ca is described below

commit b8ee006ca4181406c7effdb8868597e7febbf46a
Author: fwang12 <[email protected]>
AuthorDate: Wed May 17 10:42:42 2023 +0800

    [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 <[email protected]>
    Signed-off-by: fwang12 <[email protected]>
---
 .../org/apache/kyuubi/server/rest/client/BatchRestApiSuite.scala    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/kyuubi-server/src/test/scala/org/apache/kyuubi/server/rest/client/BatchRestApiSuite.scala
 
b/kyuubi-server/src/test/scala/org/apache/kyuubi/server/rest/client/BatchRestApiSuite.scala
index ef53fbe3e..d04826a9d 100644
--- 
a/kyuubi-server/src/test/scala/org/apache/kyuubi/server/rest/client/BatchRestApiSuite.scala
+++ 
b/kyuubi-server/src/test/scala/org/apache/kyuubi/server/rest/client/BatchRestApiSuite.scala
@@ -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)

Reply via email to