Skip to content

[SCB-1304]FallbackPolicy#getFallbackResponse add Throwable#1231

Merged
liubao68 merged 1 commit intoapache:masterfrom
pengliang56:addFallbackException
Jun 27, 2019
Merged

[SCB-1304]FallbackPolicy#getFallbackResponse add Throwable#1231
liubao68 merged 1 commit intoapache:masterfrom
pengliang56:addFallbackException

Conversation

@pengliang56
Copy link
Contributor

@pengliang56 pengliang56 commented May 31, 2019

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a JIRA issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [SCB-XXX] Fixes bug in ApproximateQuantiles, where you replace SCB-XXX with the appropriate JIRA issue.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean install -Pit to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

@pengliang56 pengliang56 force-pushed the addFallbackException branch from bef31f8 to 5eefcff Compare May 31, 2019 10:18
@pengliang56 pengliang56 changed the title Add fallback exception [SCB-1304]FallbackPolicy#getFallbackResponse add Throwable May 31, 2019
@coveralls
Copy link

coveralls commented May 31, 2019

Coverage Status

Coverage increased (+0.003%) to 85.68% when pulling 4d0309d on wuliuqi666:addFallbackException into 9c73a01 on apache:master.


@Override
public Response getFallbackResponse(Invocation invocation) {
public Response getFallbackResponse(Invocation invocation, Throwable error) {
Copy link
Contributor

@wujimin wujimin Jun 4, 2019

Choose a reason for hiding this comment

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

need change second parameter from null to error of createBizkeeperException, or not?

if need, then need add UT and IT for this.

Copy link
Contributor

Choose a reason for hiding this comment

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

It's better to use error as the parameter, I think

String name();

Response getFallbackResponse(Invocation invocation);
Response getFallbackResponse(Invocation invocation, Throwable error);
Copy link
Contributor

Choose a reason for hiding this comment

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

seems not compatible?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the change is fine. Users can change their implementations easily.


@Override
public Response getFallbackResponse(Invocation invocation, Throwable error) {
return Response.succResp("test");
Copy link
Contributor

Choose a reason for hiding this comment

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

This test case is better to include some message from error and check it.

@pengliang56 pengliang56 force-pushed the addFallbackException branch from 5eefcff to 4d0309d Compare June 21, 2019 02:27
@liubao68 liubao68 merged commit 6d728de into apache:master Jun 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants