Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement unimplemented_method test #846

Merged
merged 1 commit into from
Aug 27, 2015
Merged

Implement unimplemented_method test #846

merged 1 commit into from
Aug 27, 2015

Conversation

zsurocking
Copy link
Contributor

No description provided.

@zsurocking
Copy link
Contributor Author

Fix #706

try {
stub.unimplementedCall(Empty.getDefaultInstance());
} catch (Throwable t) {
assertEquals(Status.UNIMPLEMENTED, Status.fromThrowable(t));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per the spec, we should check the code and message.

assertEquals(Status.UNIMPLEMENTED.getCode(), Status.fromThrowable(t).getCode());
assertNull(Status.fromThrowable(t).getDescription());

I think the second check will fail with the current implementation, so we should either:

  1. update the server side code to not append the description, or
  2. remove this overstrict limit from the Spec and don't do such check.

@ejona86, what do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could maybe do both. It does seem the test case is overly-strict. I know if we get a 404 from a server the client will say it came from an HTTP 404. We can talk to @a11r to determine why it requires the description to be null.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Talked to @a11r, he would like to stick with no description if it does not add additional information.
Removed server side description.

@zsurocking
Copy link
Contributor Author

PTAL

@madongfly
Copy link
Contributor

@zsurocking, LGTM


/** Sends an rpc to an unimplemented method on the server. **/
@Test(timeout = 10000)
/** Sends an rpc to an unimplemented method on the server. **/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trash duplicate comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@ejona86
Copy link
Member

ejona86 commented Aug 26, 2015

@zsurocking LGTM

@zsurocking zsurocking merged commit 7fc86e5 into grpc:master Aug 27, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Jan 22, 2019
@lock lock bot unassigned madongfly Jan 22, 2019
@thelinuxfoundation
Copy link

Thank you for your pull request. Before we can look at your contribution, we need to ensure all contributors are covered by a Contributor License Agreement.

After the following items are addressed, please respond with a new comment here, and the automated system will re-verify.

Regards,
CLA GitHub bot

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants