hemantk-12 commented on code in PR #5844:
URL: https://github.com/apache/ozone/pull/5844#discussion_r1434003120


##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/impl/TestContainerDataYaml.java:
##########
@@ -188,22 +189,19 @@ public void testCreateContainerFileWithoutReplicaIndex(
     cleanup();
   }
 
-
   @ContainerLayoutTestInfo.ContainerTest
-  public void testIncorrectContainerFile(ContainerLayoutVersion layout)
-      throws IOException {
+  public void testIncorrectContainerFile(ContainerLayoutVersion layout) {
     setLayoutVersion(layout);
-    try {
-      String containerFile = "incorrect.container";
-      //Get file from resources folder
+    String containerFile = "incorrect.container";
+
+    IllegalArgumentException exception = 
assertThrows(IllegalArgumentException.class, () -> {
+      // Get file from resource folder
       ClassLoader classLoader = getClass().getClassLoader();
       File file = new File(classLoader.getResource(containerFile).getFile());

Review Comment:
   Done.



-- 
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