You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2023/01/18 08:51:22 UTC
[GitHub] [kyuubi] turboFei commented on a diff in pull request #4185: Post session exception if failed to open engine session
turboFei commented on code in PR #4185:
URL: https://github.com/apache/kyuubi/pull/4185#discussion_r1073250528
##########
kyuubi-server/src/test/scala/org/apache/kyuubi/server/api/v1/SessionsResourceSuite.scala:
##########
@@ -277,4 +277,22 @@ class SessionsResourceSuite extends KyuubiFunSuite with RestFrontendTestHelper {
.post(Entity.entity(getCrossReferenceReq, MediaType.APPLICATION_JSON_TYPE))
assert(404 == response.getStatus)
}
+
+ test("post session exception if failed to open engine session") {
+ val requestObj = new SessionOpenRequest(
+ 1,
+ Map("spark.master" -> "invalid").asJava)
+
+ var response = webTarget.path("api/v1/sessions")
+ .request(MediaType.APPLICATION_JSON_TYPE)
+ .post(Entity.entity(requestObj, MediaType.APPLICATION_JSON_TYPE))
+
+ val sessionHandle = response.readEntity(classOf[SessionHandle]).getIdentifier
+
+ eventually(timeout(1.minutes), interval(200.milliseconds)) {
+ response = webTarget.path(s"api/v1/sessions/$sessionHandle").request().get()
+ val sessionEvent = response.readEntity(classOf[String])
Review Comment:
will meet json parse exception with `response.readEntity(classOf[KyuubiSessionEvent])`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org