[ 
https://issues.apache.org/jira/browse/HDFS-12431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18016662#comment-18016662
 ] 

ASF GitHub Bot commented on HDFS-12431:
---------------------------------------

zhtttylz commented on code in PR #7908:
URL: https://github.com/apache/hadoop/pull/7908#discussion_r2305927350


##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestBootstrapStandby.java:
##########
@@ -291,14 +290,20 @@ public void testRollingUpgradeBootstrapStandby() throws 
Exception {
 
     for (int i = 1; i < maxNNCount; i++) {
       bs.setConf(cluster.getConfiguration(i));
-      assertThrows("BootstrapStandby should fail the image transfer request",
-          HttpGetFailedException.class, () -> {
+      assertThrows(
+          HttpGetFailedException.class,
+          () -> {
             try {
               bs.run(new String[]{"-force"});
             } catch (RuntimeException e) {
-              throw e.getCause();
+              // 和原来一样,把包装的 cause 抛出来以匹配期望异常类型

Review Comment:
   Thanks for the feedback—I’ll make the updates right away!





> Upgrade JUnit from 4 to 5 in hadoop-hdfs hdfs  
> -----------------------------------------------
>
>                 Key: HDFS-12431
>                 URL: https://issues.apache.org/jira/browse/HDFS-12431
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: test
>            Reporter: Ajay Kumar
>            Assignee: Hualong Zhang
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 3.5.0
>
>
> Upgrade JUnit from 4 to 5 in hadoop-hdfs hdfs (i.e org.apache.hadoop.hdfs)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to