Skip to content

Commit 8905bde

Browse files
cxzl25turboFei
authored andcommitted
[KYUUBI #2594][FOLLOWUP] Fix flaky Test - support engine alive probe to fast fail on engine broken
### _Why are the changes needed?_ #2594 In this test case, `ENGINE_REQUEST_TIMEOUT` is set to 100 milliseconds, `KyuubiSyncThriftClient#createTProtocol` sometimes exits directly due to `Read timed out`, session closes, and the test fails. https://github.com/cxzl25/incubator-kyuubi/runs/6507912792?check_suite_focus=true ``` 2022-05-19T13:59:50.9049182Z - KYUUBI #2102 - support engine alive probe to fast fail on engine broken *** FAILED *** 2022-05-19T13:59:50.9053749Z 2 was not greater than 3000 (KyuubiOperationPerConnectionSuite.scala:253) ``` ``` 13:59:50.401 KyuubiSessionManager-exec-pool: Thread-3608 ERROR KyuubiSessionImpl: Opening engine [kyuubi_CONNECTION_SPARK_SQL_runner_8df442d1-a6b0-4694-ac3a-bb6c758fe02b fv-az83-137:37443] for runner session failed org.apache.thrift.transport.TTransportException: java.net.SocketTimeoutException: Read timed out at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:129) ~[libthrift-0.9.3.jar:0.9.3] at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86) ~[libthrift-0.9.3.jar:0.9.3] at org.apache.thrift.transport.TSaslTransport.receiveSaslMessage(TSaslTransport.java:178) ~[libthrift-0.9.3.jar:0.9.3] at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:307) ~[libthrift-0.9.3.jar:0.9.3] at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37) ~[libthrift-0.9.3.jar:0.9.3] at org.apache.kyuubi.client.KyuubiSyncThriftClient$.createTProtocol(KyuubiSyncThriftClient.scala:399) ~[classes/:?] at org.apache.kyuubi.client.KyuubiSyncThriftClient$.createClient(KyuubiSyncThriftClient.scala:417) ~[classes/:?] at org.apache.kyuubi.session.KyuubiSessionImpl.$anonfun$openEngineSession$1(KyuubiSessionImpl.scala:106) ~[classes/:?] ``` ### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #2710 from cxzl25/KYUUBI-2594-FOLLOWUP. Closes #2594 a004e51 [sychen] trigger test d445790 [sychen] 3s f152ba2 [sychen] trigger test 2af2657 [sychen] increase ENGINE_REQUEST_TIMEOUT Authored-by: sychen <sychen@ctrip.com> Signed-off-by: Fei Wang <fwang12@ebay.com>
1 parent b673b2f commit 8905bde

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kyuubi-server/src/test/scala/org/apache/kyuubi/operation/KyuubiOperationPerConnectionSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,10 @@ class KyuubiOperationPerConnectionSuite extends WithKyuubiServer with HiveJDBCTe
231231
test("KYUUBI #2102 - support engine alive probe to fast fail on engine broken") {
232232
withSessionConf(Map(
233233
KyuubiConf.ENGINE_ALIVE_PROBE_ENABLED.key -> "true",
234-
KyuubiConf.ENGINE_ALIVE_PROBE_INTERVAL.key -> "100",
234+
KyuubiConf.ENGINE_ALIVE_PROBE_INTERVAL.key -> "1000",
235235
KyuubiConf.ENGINE_ALIVE_TIMEOUT.key -> "3000",
236236
KyuubiConf.OPERATION_THRIFT_CLIENT_REQUEST_MAX_ATTEMPTS.key -> "10000",
237-
KyuubiConf.ENGINE_REQUEST_TIMEOUT.key -> "100"))(Map.empty)(Map.empty) {
237+
KyuubiConf.ENGINE_REQUEST_TIMEOUT.key -> "1000"))(Map.empty)(Map.empty) {
238238
withSessionHandle { (client, handle) =>
239239
val preReq = new TExecuteStatementReq()
240240
preReq.setStatement("select engine_name()")

0 commit comments

Comments
 (0)