JyotinderSingh commented on a change in pull request #3109:
URL: https://github.com/apache/ozone/pull/3109#discussion_r810510412
##########
File path:
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFileSystemMetrics.java
##########
@@ -155,6 +153,12 @@ private void testOzoneFileCommit(TestOps op) throws
Exception {
long numKeysAfterDelete = cluster
.getOzoneManager().getMetrics().getNumKeys();
Assert.assertTrue(numKeysAfterDelete >= 0);
- Assert.assertEquals(numKeysBeforeCreate, numKeysAfterDelete);
+ // The intermediate directories in the filePath are added to the directory
+ // table, and are added to the metrics as a key.
+ // When we delete the Key/File/Directory - the intermediate directories
+ // added to the directory table are cleared out using
+ // DirectoryDeletingService - which does not decrement the numKey metrics.
+ // Therefore, the numKeys metrics should be one more than the initial
value.
+ Assert.assertEquals(numKeysBeforeCreate + 1, numKeysAfterDelete);
Review comment:
@rakeshadr
This is a behavior change in the test, could you review this?
--
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]