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/21 14:24:24 UTC

[kyuubi] branch branch-1.7 updated: [KYUUBI #4858] Relax test message assertion in "sync query causes engine crash"

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 5afc95697 [KYUUBI #4858] Relax test message assertion in "sync query causes engine crash"
5afc95697 is described below

commit 5afc95697beee7838bf68f3c7c7541f5927ee489
Author: Cheng Pan <ch...@apache.org>
AuthorDate: Sun May 21 22:24:02 2023 +0800

    [KYUUBI #4858] Relax test message assertion in "sync query causes engine crash"
    
    ### _Why are the changes needed?_
    
    The exception for such network issue changes in JDK 17, but the error message looks reasonable, here we simply relax the test message assertion to make UT happy.
    
    ### _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 #4858 from pan3793/socket-msg.
    
    Closes #4858
    
    c53b5fed4 [Cheng Pan] Relax test message assertion in "sync query causes engine crash"
    
    Authored-by: Cheng Pan <ch...@apache.org>
    Signed-off-by: Cheng Pan <ch...@apache.org>
    (cherry picked from commit 571bfa3ce78c2f8a197c74017347103f4fad1de2)
    Signed-off-by: Cheng Pan <ch...@apache.org>
---
 .../apache/kyuubi/operation/KyuubiOperationPerConnectionSuite.scala  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/kyuubi-server/src/test/scala/org/apache/kyuubi/operation/KyuubiOperationPerConnectionSuite.scala b/kyuubi-server/src/test/scala/org/apache/kyuubi/operation/KyuubiOperationPerConnectionSuite.scala
index 83124a456..977768312 100644
--- a/kyuubi-server/src/test/scala/org/apache/kyuubi/operation/KyuubiOperationPerConnectionSuite.scala
+++ b/kyuubi-server/src/test/scala/org/apache/kyuubi/operation/KyuubiOperationPerConnectionSuite.scala
@@ -77,8 +77,9 @@ class KyuubiOperationPerConnectionSuite extends WithKyuubiServer with HiveJDBCTe
       val executeStmtResp = client.ExecuteStatement(executeStmtReq)
       assert(executeStmtResp.getStatus.getStatusCode === TStatusCode.ERROR_STATUS)
       assert(executeStmtResp.getOperationHandle === null)
-      assert(executeStmtResp.getStatus.getErrorMessage contains
-        "Caused by: java.net.SocketException: Connection reset")
+      val errMsg = executeStmtResp.getStatus.getErrorMessage
+      assert(errMsg.contains("Caused by: java.net.SocketException: Connection reset") ||
+        errMsg.contains(s"Socket for ${SessionHandle(handle)} is closed"))
     }
   }