peterxcli commented on code in PR #8228:
URL: https://github.com/apache/ozone/pull/8228#discussion_r2028766174
##########
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:
nit:
Do you want to parameterize these three test about the commit space boundary
test?
Can have two parameters for them `(int sizeTillMax, int
desiredCommitDecrment)`, and add description directly on those test sets:
```
(ContainerTestHelper.CONTAINER_MAX_SIZE, 256)
(100, 100)
(0, 0)
(256, 256)
```
--
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]