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 75cca5f commit fbd9769
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class KyuubiRestFrontendServiceSuite extends RestFrontendTestHelper {
assert(resp.readEntity(classOf[String]) === "pong")
}

test("test error and exception response") {
test("error and exception response") {
// send a not exists request
var response = webTarget.path("api/v1/pong").request().get()
assert(404 == response.getStatus)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import org.apache.kyuubi.operation.OperationType.OperationType

class OperationsResourceSuite extends KyuubiFunSuite with RestFrontendTestHelper {

test("test get an operation event") {
test("get an operation event") {
val catalogsHandleStr = getOpHandleStr(OperationType.GET_CATALOGS)
var response = webTarget.path(s"api/v1/operations/$catalogsHandleStr/event")
.request(MediaType.APPLICATION_JSON_TYPE).get()
Expand All @@ -55,7 +55,7 @@ class OperationsResourceSuite extends KyuubiFunSuite with RestFrontendTestHelper
assert(404 == response.getStatus)
}

test("test apply an action for an operation") {
test("apply an action for an operation") {
val opHandleStr = getOpHandleStr(OperationType.EXECUTE_STATEMENT)

var response = webTarget.path(s"api/v1/operations/$opHandleStr")
Expand All @@ -79,7 +79,7 @@ class OperationsResourceSuite extends KyuubiFunSuite with RestFrontendTestHelper
assert(404 == response.getStatus)
}

test("test get result set metadata") {
test("get result set metadata") {
val opHandleStr = getOpHandleStr(OperationType.EXECUTE_STATEMENT)
checkOpState(opHandleStr, FINISHED)
val response = webTarget.path(s"api/v1/operations/$opHandleStr/resultsetmetadata")
Expand All @@ -89,7 +89,7 @@ class OperationsResourceSuite extends KyuubiFunSuite with RestFrontendTestHelper
assert(resultSetMetaData.columns.head.columnName.equals("database"))
}

test("test get operation log") {
test("get operation log") {
val opHandleStr = getOpHandleStr(OperationType.EXECUTE_STATEMENT)
checkOpState(opHandleStr, FINISHED)
val response = webTarget.path(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class SessionsResourceSuite extends KyuubiFunSuite with RestFrontendTestHelper {
assert(sessions2.sessionList.isEmpty)
}

test("test get session event") {
test("get session event") {
val sessionManager = fe.be.sessionManager
val sessionHandle = sessionManager.openSession(
HIVE_CLI_SERVICE_PROTOCOL_V2,
Expand Down Expand Up @@ -134,7 +134,7 @@ class SessionsResourceSuite extends KyuubiFunSuite with RestFrontendTestHelper {
assert(404 == response.getStatus)
}

test("test get infoType") {
test("get infoType") {
val requestObj = SessionOpenRequest(
1,
"admin",
Expand Down Expand Up @@ -251,7 +251,7 @@ class SessionsResourceSuite extends KyuubiFunSuite with RestFrontendTestHelper {
assert(operationHandle.typ == OperationType.GET_FUNCTIONS)
}

test("test close an operation") {
test("close an operation") {
val requestObj = SessionOpenRequest(
1,
"admin",
Expand Down

0 comments on commit fbd9769

Please sign in to comment.