This is an automated email from the ASF dual-hosted git repository.
chengpan 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 facbd7838 [KYUUBI #4979] Fix flaky test: support to interrupt the
thrift request if remote engine is broken
facbd7838 is described below
commit facbd78383678eb7092bd42be2e744b5fd05ff51
Author: Cheng Pan <[email protected]>
AuthorDate: Mon Jun 19 16:04:59 2023 +0800
[KYUUBI #4979] Fix flaky test: support to interrupt the thrift request if
remote engine is broken
### _Why are the changes needed?_
https://github.com/apache/kyuubi/actions/runs/5307034060/jobs/9605209396
```
- support to interrupt the thrift request if remote engine is broken ***
FAILED ***
"org.apache.kyuubi.KyuubiSQLException: Error operating ExecuteStatement:
Socket for SessionHandle [68f22014-c484-4279-8f79-81bd2e7f0eca] is closed" did
not contain "java.net.SocketException", and
"org.apache.kyuubi.KyuubiSQLException: Error operating ExecuteStatement: Socket
for SessionHandle [68f22014-c484-4279-8f79-81bd2e7f0eca] is closed" did not
contain "org.apache.thrift.transport.TTransportException", and
"org.apache.kyuubi.KyuubiSQLException: Error operating ExecuteStatement: [...]
```
### _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 #4979 from pan3793/test-1.
Closes #4979
86807e751 [Cheng Pan] Fix flaky test: support to interrupt the thrift
request if remote engine is broken
Authored-by: Cheng Pan <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
---
.../kyuubi/operation/KyuubiOperationPerConnectionSuite.scala | 11 +++++------
1 file changed, 5 insertions(+), 6 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 f5fdb5b51..9c69817a3 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
@@ -327,12 +327,11 @@ class KyuubiOperationPerConnectionSuite extends
WithKyuubiServer with HiveJDBCTe
val startTime = System.currentTimeMillis()
val executeStmtResp = client.ExecuteStatement(executeStmtReq)
assert(executeStmtResp.getStatus.getStatusCode ===
TStatusCode.ERROR_STATUS)
- assert(executeStmtResp.getStatus.getErrorMessage.contains(
- "java.net.SocketException") ||
- executeStmtResp.getStatus.getErrorMessage.contains(
- "org.apache.thrift.transport.TTransportException") ||
- executeStmtResp.getStatus.getErrorMessage.contains(
- "connection does not exist"))
+ val errorMsg = executeStmtResp.getStatus.getErrorMessage
+ assert(errorMsg.contains("java.net.SocketException") ||
+ errorMsg.contains("org.apache.thrift.transport.TTransportException")
||
+ errorMsg.contains("connection does not exist") ||
+ errorMsg.contains(s"Socket for ${SessionHandle(handle)} is closed"))
val elapsedTime = System.currentTimeMillis() - startTime
assert(elapsedTime < 20 * 1000)
eventually(timeout(3.seconds)) {