adoroszlai commented on a change in pull request #272: HDDS-2629. Ozone CLI: 
CreationTime/modifyTime of volume/bucket/key in…
URL: https://github.com/apache/hadoop-ozone/pull/272#discussion_r352096478
 
 

 ##########
 File path: 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHA.java
 ##########
 @@ -228,7 +228,8 @@ public void testAllBucketOperations() throws Exception {
     Assert.assertEquals(bucketName, ozoneBucket.getName());
     Assert.assertTrue(ozoneBucket.getVersioning());
     Assert.assertEquals(StorageType.DISK, ozoneBucket.getStorageType());
-    Assert.assertTrue(ozoneBucket.getCreationTime() <= Time.now());
+    Assert.assertTrue(ozoneBucket.getCreationTime().compareTo(
+        Instant.now()) <= 0);
 
 Review comment:
   I think using `isAfter`/`isBefore` would be easier to understand at a glance.
   
   ```
   assertFalse(ozoneBucket.getCreationTime().isAfter(Instant.now()))
   ```
   
   (I hope I got the conversion right).
   
   Similarly in all other places where `compareTo()` is used.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org

Reply via email to