Skip to content

Commit

Permalink
Migrating existing rest fe test to real cases
Browse files Browse the repository at this point in the history
  • Loading branch information
yaooqinn committed Dec 28, 2021
1 parent 0c1feb4 commit a31ab50
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,10 @@ class SessionsResourceSuite extends KyuubiFunSuite with RestFrontendTestHelper {
assert(sessionHandle.protocol.getValue == 1)
assert(sessionHandle.identifier != null)

// verify the exec pool statistic
val statistic = webTarget.path("api/v1/sessions/execPool/statistic").request().get()
val execPoolStatistic1 = statistic.readEntity(classOf[ExecPoolStatistic])
assert(execPoolStatistic1.execPoolSize == 1 && execPoolStatistic1.execPoolActiveCount == 1)

// verify the open session count
response = webTarget.path("api/v1/sessions/count").request().get()
val openedSessionCount = response.readEntity(classOf[SessionOpenCount])
assert(openedSessionCount.openSessionCount == 1)
Expand All @@ -67,7 +65,6 @@ class SessionsResourceSuite extends KyuubiFunSuite with RestFrontendTestHelper {
response = webTarget.path(s"api/v1/sessions/$serializedSessionHandle").request().delete()
assert(200 == response.getStatus)

// verify the open session count again
response = webTarget.path("api/v1/sessions/count").request().get()
val openedSessionCount2 = response.readEntity(classOf[SessionOpenCount])
assert(openedSessionCount2.openSessionCount == 0)
Expand All @@ -91,7 +88,7 @@ class SessionsResourceSuite extends KyuubiFunSuite with RestFrontendTestHelper {
val sessions1 = response2.readEntity(classOf[SessionList])
assert(sessions1.sessionList.nonEmpty)

// close a opened session
// close an opened session
val sessionHandle = response.readEntity(classOf[SessionHandle])
val serializedSessionHandle = s"${sessionHandle.identifier.publicId}|" +
s"${sessionHandle.identifier.secretId}|${sessionHandle.protocol.getValue}"
Expand Down

0 comments on commit a31ab50

Please sign in to comment.