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


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/scm/TestSCMNodeManagerMXBean.java:
##########
@@ -98,7 +98,7 @@ public void testNodeCount() throws Exception {
     Map<String, Map<String, Integer>> mbeanMap = convertNodeCountToMap(data);
     Map<String, Map<String, Integer>> nodeMap =
         scm.getScmNodeManager().getNodeCount();
-    assertTrue(nodeMap.equals(mbeanMap));
+    assertEquals(nodeMap, mbeanMap);

Review Comment:
   Same a previous comment.



##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerRestart.java:
##########
@@ -117,7 +116,7 @@ public void testRestartOMWithVolumeOperation() throws 
Exception {
     objectStore.createVolume(volumeName);
 
     OzoneVolume ozoneVolume = objectStore.getVolume(volumeName);
-    assertTrue(ozoneVolume.getName().equals(volumeName));
+    assertEquals(ozoneVolume.getName(), volumeName);

Review Comment:
   nit: should be in `assertEquals(expected, actual)` format here and line 130.



##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestKeyManagerImpl.java:
##########
@@ -1523,13 +1523,10 @@ public void testRefreshPipelineException() throws 
Exception {
     KeyManagerImpl keyManagerImpl =
         new KeyManagerImpl(ozoneManager, scmClientMock, conf, metrics);
 
-    try {
-      keyManagerImpl.refresh(omKeyInfo);
-      fail();
-    } catch (OMException omEx) {
-      assertEquals(SCM_GET_PIPELINE_EXCEPTION, omEx.getResult());
-      assertTrue(omEx.getMessage().equals(errorMessage));
-    }
+    OMException omEx = assertThrows(OMException.class,
+        () -> keyManagerImpl.refresh(omKeyInfo));
+    assertEquals(SCM_GET_PIPELINE_EXCEPTION, omEx.getResult());
+    assertEquals(errorMessage, omEx.getMessage());

Review Comment:
   nit: should we use `assertThat()` here?



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