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 ada033f52 [KYUUBI #4978][FOLLOWUP] Fix flaky test: close expired 
operations
ada033f52 is described below

commit ada033f520cd3e7809fe0618274719419d31ebf8
Author: Cheng Pan <[email protected]>
AuthorDate: Sun Jun 25 10:41:28 2023 +0800

    [KYUUBI #4978][FOLLOWUP] Fix flaky test: close expired operations
    
    ### _Why are the changes needed?_
    
    The assertions are fragile because the session only has 5s as the idle 
timeout.
    ```
    assert(lastAccessTime === session.lastAccessTime)
    assert(sessionManager.getOpenSessionCount === 1)
    ```
    
    
https://github.com/apache/kyuubi/actions/runs/5312620487/jobs/9617377736?pr=4980
    
    ```
    - close expired operations *** FAILED ***
      0 did not equal 1 (TFrontendServiceSuite.scala:544)
    ```
    
    ### _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
    
    Closes #4987 from pan3793/flaytest.
    
    Closes #4978
    
    3feacafe1 [Cheng Pan] nit
    317f04576 [Cheng Pan] [KYUUBI #4978][FOLLOWUP] Fix flaky test: close 
expired operations
    
    Authored-by: Cheng Pan <[email protected]>
    Signed-off-by: Cheng Pan <[email protected]>
    (cherry picked from commit c2e861bbfbcc1367a92bc02676edb995c5a77917)
    Signed-off-by: Cheng Pan <[email protected]>
---
 .../test/scala/org/apache/kyuubi/service/TFrontendServiceSuite.scala  | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

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 91bd3a264..914388b99 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
@@ -538,14 +538,12 @@ class TFrontendServiceSuite extends KyuubiFunSuite {
       eventually(timeout(Span(60, Seconds)), interval(Span(1, Seconds))) {
         assert(lastAccessTime <= session.lastIdleTime)
       }
-
       info("operation is terminated")
-      assert(lastAccessTime === session.lastAccessTime)
-      assert(sessionManager.getOpenSessionCount === 1)
 
       eventually(timeout(Span(60, Seconds)), interval(Span(1, Seconds))) {
         assert(session.lastAccessTime > lastAccessTime)
       }
+      info("session is terminated")
       assert(sessionManager.getOpenSessionCount === 0)
     }
   }

Reply via email to