siddhantsangwan commented on code in PR #8228:
URL: https://github.com/apache/ozone/pull/8228#discussion_r2030447785
##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/impl/TestContainerPersistence.java:
##########
@@ -627,13 +627,160 @@ public void testWriteChunk(ContainerTestVersionInfo
versionInfo)
}
/**
- * Writes many chunks of the same block into different chunk files and
- * verifies that we have that data in many files.
+ * Tests that committed space is correctly decremented when a write fits
entirely within the available space under
+ * max container size. It should be decremented by the number of bytes
written.
*
- * @throws IOException
- * @throws NoSuchAlgorithmException
+ * Before write: Container size is less than max size
+ * After write: Container size is still less than max size
+ */
+ @ContainerTestVersionInfo.ContainerTest
+ public void
testIncrWriteBytesDecrementsCommittedWhenWriteFits(ContainerTestVersionInfo
versionInfo)
Review Comment:
In this particular case I find having explicit, different tests to be
simpler and more understandable. I think it's good enough for now!
--
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]