Skip to content

Commit

Permalink
fix test coverage
Browse files Browse the repository at this point in the history
Signed-off-by: Lantao Jin <ltjin@amazon.com>
  • Loading branch information
LantaoJin committed Jun 11, 2024
1 parent 1de2a5d commit 13c2697
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions sql/src/test/java/org/opensearch/sql/sql/SQLServiceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,45 @@ public void onFailure(Exception e) {
});
}

@Test
public void can_execute_raw_format_request() {
sqlService.execute(
new SQLQueryRequest(new JSONObject(), "SELECT 123", QUERY, "raw"),
new ResponseListener<QueryResponse>() {
@Override
public void onResponse(QueryResponse response) {
assertNotNull(response);
}

@Override
public void onFailure(Exception e) {
fail(e);
}
});
}

@Test
public void can_execute_pretty_raw_format_request() {
sqlService.execute(
new SQLQueryRequest(
new JSONObject(),
"SELECT 123",
QUERY,
Map.of("format", "jdbc", "pretty", "true"),
"n:cursor"),
new ResponseListener<QueryResponse>() {
@Override
public void onResponse(QueryResponse response) {
assertNotNull(response);
}

@Override
public void onFailure(Exception e) {
fail(e);
}
});
}

@Test
public void can_explain_sql_query() {
doAnswer(
Expand Down

0 comments on commit 13c2697

Please sign in to comment.