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!



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to