-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HDFS-16702. MiniDFSCluster should report cause of exception in assert… #4680
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
Conversation
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
Show resolved
Hide resolved
💔 -1 overall
This message was automatically generated. |
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.
i'm happy with the root cause being rethrown directly, if the method signature doesn't change. otherwise, make sure the caught exceptions toString is passed up...maven surefire doesn't print full stacks by default
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
Outdated
Show resolved
Hide resolved
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.
LGTM,
+1 pending yetus
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.
LGTM too
💔 -1 overall
This message was automatically generated. |
I looked into the 2 failed unit tests, and they don't appear to be related to the change. |
Merged to trunk, thanks @snmvaughan . |
… error (apache#4680) When the MiniDFSClsuter detects that an exception caused an exit, it should include that exception as the cause for the AssertionError that it throws. The current AssertError simply reports the message "Test resulted in an unexpected exit" and provides a stack trace to the location of the check for an exit exception. This patch adds the original exception as the cause of the AssertError.
Description of PR
When the MiniDFSClsuter detects that an exception caused an exit, it should include that exception as the cause for the AssertionError that it throws. The current AssertError simply reports the message "Test resulted in an unexpected exit" and provides a stack trace to the location of the check for an exit exception. This patch adds the original exception as the cause of the AssertError.
How was this patch tested?
This was used in local unit test runs during debugging. The updated exception was particularly useful in CI unit test reports.
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?