slfan1989 commented on code in PR #7739: URL: https://github.com/apache/hadoop/pull/7739#discussion_r2157778080
########## hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSUpgrade.java: ########## @@ -432,21 +434,22 @@ private void deleteStorageFilesWithPrefix(String[] nameNodeDirs, String prefix) File currentDir = new File(baseDir, "current"); for (File f : currentDir.listFiles()) { if (f.getName().startsWith(prefix)) { - assertTrue("Deleting " + f, f.delete()); + assertTrue(f.delete(), "Deleting " + f); } } } } - @Test(expected=IOException.class) + @Test public void testUpgradeFromPreUpgradeLVFails() throws IOException { + Assertions.assertThrows(IOException.class, () -> { Review Comment: It’s better to use static imports to avoid situations like Assertions.*. -- 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-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org