You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/09/03 06:26:45 UTC

[GitHub] [hadoop-ozone] amaliujia commented on a change in pull request #1379: HDDS-4199. Fix failed UT: TestOMAllocateBlockRequest#testValidateAndUpdateCache

amaliujia commented on a change in pull request #1379:
URL: https://github.com/apache/hadoop-ozone/pull/1379#discussion_r482731988



##########
File path: hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/key/TestOMAllocateBlockRequest.java
##########
@@ -97,8 +95,11 @@ public void testValidateAndUpdateCache() throws Exception {
     // Check modification time
     Assert.assertEquals(modifiedOmRequest.getAllocateBlockRequest()
         .getKeyArgs().getModificationTime(), omKeyInfo.getModificationTime());
-    Assert.assertNotEquals(omKeyInfo.getCreationTime(),
-        omKeyInfo.getModificationTime());
+
+    // creationTime was assigned at TestOMRequestUtils.addKeyToTable
+    // modificationTime was assigned at doPreExecute(createAllocateBlockRequest())
+    Assert.assertTrue(
+        omKeyInfo.getCreationTime() <= omKeyInfo.getModificationTime());

Review comment:
       +1 LGTM!




----------------------------------------------------------------
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:
users@infra.apache.org



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