Github user jihoonson commented on a diff in the pull request:
https://github.com/apache/tajo/pull/829#discussion_r42337101
--- Diff:
tajo-core-tests/src/test/java/org/apache/tajo/ws/rs/resources/TestQueryResultResource.java
---
@@ -151,6 +155,25 @@ public void testGetQueryResult() throws Exception {
}
@Test
+ public void testGetQueryResultWithoutSessionId() throws Exception {
+ String sessionId = generateNewSessionAndGetId();
+ URI queryIdURI = sendNewQueryResquest(sessionId, "select * from
lineitem");
+ URI queryResultURI = new URI(queryIdURI + "/result");
+
+ boolean isBadRequest = false;
+ try {
+ GetQueryResultDataResponse response =
restClient.target(queryResultURI)
+ .request()
+ .get(new GenericType<>(GetQueryResultDataResponse.class));
+ } catch (BadRequestException e) {
+ isBadRequest = true;
--- End diff --
How about using expected exception of junit? It will make test codes
simpler.
Please refer to test cases in TestCatalogAdminClientExceptions.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---