You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2022/08/03 11:15:23 UTC
[GitHub] [hadoop] steveloughran commented on a diff in pull request #4680: HDFS-16702. MiniDFSCluster should report cause of exception in assert…
steveloughran commented on code in PR #4680:
URL: https://github.com/apache/hadoop/pull/4680#discussion_r936539209
##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java:
##########
@@ -2159,10 +2159,10 @@ public void shutdown(boolean deleteDfsDir, boolean closeFileSystem) {
LOG.info("Shutting down the Mini HDFS Cluster");
if (checkExitOnShutdown) {
if (ExitUtil.terminateCalled()) {
- LOG.error("Test resulted in an unexpected exit",
- ExitUtil.getFirstExitException());
+ Exception cause = ExitUtil.getFirstExitException();
+ LOG.error("Test resulted in an unexpected exit", cause);
ExitUtil.resetFirstExitException();
- throw new AssertionError("Test resulted in an unexpected exit");
+ throw new AssertionError("Test resulted in an unexpected exit", cause);
Review Comment:
include cause.toString in the message so when maven is not printing stack traces that cause is still printed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org