adoroszlai commented on code in PR #5817:
URL: https://github.com/apache/ozone/pull/5817#discussion_r1430910905


##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/impl/TestContainerPersistence.java:
##########
@@ -810,7 +811,7 @@ public void 
testPutBlockWithInvalidBCSId(ContainerTestVersionInfo versionInfo)
           getBlock(container, blockID1);
       Assertions.fail("Expected exception not thrown");
     } catch (StorageContainerException sce) {
-      Assertions.assertTrue(sce.getResult() == UNKNOWN_BCSID);
+      assertSame(UNKNOWN_BCSID, sce.getResult());

Review Comment:
   `assertSame` for objects verifies reference equality, like `assertTrue( == 
)`.
   
   Equality of enum values can be checked both with `equals` and `==`, since 
each value is a singleton.



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