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

throwing the correct error #15

Merged
merged 7 commits into from
Jan 10, 2019
Merged

throwing the correct error #15

merged 7 commits into from
Jan 10, 2019

Conversation

patduin
Copy link

@patduin patduin commented Jan 10, 2019

fixes #16

@patduin patduin requested a review from a team January 10, 2019 11:31
.warn("Unable to run compatibility for metastore client method {}. Will rethrow original exception: ",
method.getName(), compatibilityException);
} else {
// compatibily worked but threw non TApplicaitonException, rethrowing cause.
Copy link
Contributor

Choose a reason for hiding this comment

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

TApplicaitonException -> TApplicationException

CHANGELOG.md Outdated
@@ -6,6 +6,7 @@
* Removed transitive (provided) dependency on `hbase-client`.
### Fixed
* Removed 'isOpen()' method from CloseableMetaStoreClient. See [#11](https://github.com/HotelsDotCom/hcommon-hive-metastore/issues/11).
* Issue where the wrong exception was being propagated in the compatibility layer.
Copy link
Contributor

@massdosage massdosage Jan 10, 2019

Choose a reason for hiding this comment

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

Could you create a quick GH issue with the relevant part of the stack trace and link it here? Just so in future we have a reference to this with some more detail.

Copy link
Author

Choose a reason for hiding this comment

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

#16

@Override
public Object answer(InvocationOnMock invocation) throws Throwable {
throw new RuntimeException();
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we still test what happens if something unexpected like a RuntimeException is thrown?

Copy link
Author

@patduin patduin Jan 10, 2019

Choose a reason for hiding this comment

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

Well no this test is fine,because any exception will be wrapped in a InvocationTargetException. So I changed this as it is more realistic.

@patduin patduin merged commit 94f5db8 into master Jan 10, 2019
@patduin patduin deleted the compatibility-exception branch January 10, 2019 15:01
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.

compatibility layer exceptions are hidden
4 participants