-
Notifications
You must be signed in to change notification settings - Fork 5
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
Conversation
.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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Override | ||
public Object answer(InvocationOnMock invocation) throws Throwable { | ||
throw new RuntimeException(); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
fixes #16