GeorgeJahad commented on a change in pull request #2629:
URL: https://github.com/apache/ozone/pull/2629#discussion_r705857855



##########
File path: 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmMetrics.java
##########
@@ -276,33 +279,45 @@ public void testKeyOps() throws IOException {
     assertCounter("NumTrashKeyLists", 1L, omMetrics);
     assertCounter("NumKeys", 0L, omMetrics);
     assertCounter("NumInitiateMultipartUploads", 1L, omMetrics);
+    
 
-
-    ozoneManager.openKey(keyArgs);
-    ozoneManager.commitKey(keyArgs, 0);
-    ozoneManager.openKey(keyArgs);
-    ozoneManager.commitKey(keyArgs, 0);
-    ozoneManager.openKey(keyArgs);
-    ozoneManager.commitKey(keyArgs, 0);
-    ozoneManager.deleteKey(keyArgs);
+    keyArgs = createKeyArgs();

Review comment:
       In the previous version the mocks would allow the counters would 
increment, even though the same key was being written every time.  To allow 
this to work now, I had to create new keyArgs, each time a new key was 
committed.
   




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