You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ch...@apache.org on 2023/05/22 01:45:22 UTC

[kyuubi] branch branch-1.7 updated: [KYUUBI #4857] Fix flaky test TFrontendServiceSuite

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

chengpan pushed a commit to branch branch-1.7
in repository https://gitbox.apache.org/repos/asf/kyuubi.git


The following commit(s) were added to refs/heads/branch-1.7 by this push:
     new 1f981ff15 [KYUUBI #4857] Fix flaky test TFrontendServiceSuite
1f981ff15 is described below

commit 1f981ff15391da824c310c83e4828894ca0f59d6
Author: Cheng Pan <ch...@apache.org>
AuthorDate: Mon May 22 09:44:51 2023 +0800

    [KYUUBI #4857] Fix flaky test TFrontendServiceSuite
    
    ### _Why are the changes needed?_
    
    It became flaky on my laptop w/ JDK 17, wrap assertion w/ eventually to address it.
    
    ### _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 #4857 from pan3793/flaky-1.
    
    Closes #4857
    
    8d4d3145f [Cheng Pan] Fix flaky test TFrontendServiceSuite
    
    Authored-by: Cheng Pan <ch...@apache.org>
    Signed-off-by: Cheng Pan <ch...@apache.org>
    (cherry picked from commit 4e32c3e79f501512637e72f318c16fad8a3c587b)
    Signed-off-by: Cheng Pan <ch...@apache.org>
---
 .../test/scala/org/apache/kyuubi/service/TFrontendServiceSuite.scala  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kyuubi-common/src/test/scala/org/apache/kyuubi/service/TFrontendServiceSuite.scala b/kyuubi-common/src/test/scala/org/apache/kyuubi/service/TFrontendServiceSuite.scala
index 28442fe62..6d8c5d71d 100644
--- a/kyuubi-common/src/test/scala/org/apache/kyuubi/service/TFrontendServiceSuite.scala
+++ b/kyuubi-common/src/test/scala/org/apache/kyuubi/service/TFrontendServiceSuite.scala
@@ -532,7 +532,9 @@ class TFrontendServiceSuite extends KyuubiFunSuite {
       assert(resp2.getStatus.getStatusCode === TStatusCode.SUCCESS_STATUS)
       assert(sessionManager.getOpenSessionCount == 1)
       assert(session.lastIdleTime == 0)
-      assert(lastAccessTime < session.lastAccessTime)
+      eventually(timeout(Span(60, Seconds)), interval(Span(1, Seconds))) {
+        assert(lastAccessTime < session.lastAccessTime)
+      }
       lastAccessTime = session.lastAccessTime
 
       eventually(timeout(Span(60, Seconds)), interval(Span(1, Seconds))) {