You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by Colin Ma <ju...@intel.com> on 2015/12/24 06:23:34 UTC
Review Request 41701: SQOOP-2546: Sqoop2: RESTiliency: Unify behavior
on getting details on non-existing connector
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41701/
-----------------------------------------------------------
Review request for Sqoop.
Repository: sqoop-sqoop2
Description
-------
Here is test code that is testing our behavior on non existing connector:
```
new TestDescription("Get connector by non-existing ID", "v1/connector/666", "GET", null, new Validator() {
@Override
void validate() throws Exception {
assertResponseCode(500);
assertServerException("org.apache.sqoop.error.code.CommonRepositoryError", "COMMON_0057");
}}),
new TestDescription("Get connector by non-existing name", "v1/connector/jarcecs-cool-connector", "GET", null, new Validator() {
@Override
void validate() throws Exception {
assertResponseCode(500);
assertServerException("org.apache.sqoop.server.common.ServerError", "SERVER_0005");
}}),
```
Depending whether one asks for non-existing connector ID or non-existing connector name, he gets different answer. That seems really weird for single REST end point and I think that we should fix that.
Diffs
-----
server/src/main/java/org/apache/sqoop/handler/LinkRequestHandler.java 189293a
server/src/main/java/org/apache/sqoop/server/common/ServerError.java 57bb5c0
test/src/test/java/org/apache/sqoop/integration/server/rest/ConnectorRestTest.java 3146279
test/src/test/java/org/apache/sqoop/integration/server/rest/LinkRestTest.java 99959ac
Diff: https://reviews.apache.org/r/41701/diff/
Testing
-------
Thanks,
Colin Ma
Re: Review Request 41701: SQOOP-2546: Sqoop2: RESTiliency: Unify
behavior on getting details on non-existing connector
Posted by Jarek Cecho <ja...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41701/#review111852
-----------------------------------------------------------
Ship it!
Ship It!
- Jarek Cecho
On Dec. 24, 2015, 5:23 a.m., Colin Ma wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41701/
> -----------------------------------------------------------
>
> (Updated Dec. 24, 2015, 5:23 a.m.)
>
>
> Review request for Sqoop.
>
>
> Repository: sqoop-sqoop2
>
>
> Description
> -------
>
> Here is test code that is testing our behavior on non existing connector:
>
> ```
> new TestDescription("Get connector by non-existing ID", "v1/connector/666", "GET", null, new Validator() {
> @Override
> void validate() throws Exception {
> assertResponseCode(500);
> assertServerException("org.apache.sqoop.error.code.CommonRepositoryError", "COMMON_0057");
> }}),
> new TestDescription("Get connector by non-existing name", "v1/connector/jarcecs-cool-connector", "GET", null, new Validator() {
> @Override
> void validate() throws Exception {
> assertResponseCode(500);
> assertServerException("org.apache.sqoop.server.common.ServerError", "SERVER_0005");
> }}),
> ```
>
> Depending whether one asks for non-existing connector ID or non-existing connector name, he gets different answer. That seems really weird for single REST end point and I think that we should fix that.
>
>
> Diffs
> -----
>
> server/src/main/java/org/apache/sqoop/handler/LinkRequestHandler.java 189293a
> server/src/main/java/org/apache/sqoop/server/common/ServerError.java 57bb5c0
> test/src/test/java/org/apache/sqoop/integration/server/rest/ConnectorRestTest.java 3146279
> test/src/test/java/org/apache/sqoop/integration/server/rest/LinkRestTest.java 99959ac
>
> Diff: https://reviews.apache.org/r/41701/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Colin Ma
>
>