HDDS-13477. Add OM S3 multipart commit and complete response tests#10605
Merged
Conversation
Contributor
ivandika3
reviewed
Jun 25, 2026
…onse tests Make the open key assertions meaningful: seed the part's open key before commit so post-commit assertNull proves removal, assert the initiate MPU open key (different key format) survives commit, and move commitOnePart assertions after commitBatchOperation to check committed state.
Call OmMultipartKeyInfo#addPartKeyInfo directly, key the seeded prev deleted entry with getOzoneDeletePathKey, rename deleteEntryCount to expectedDeleteEntryCount, and pass the incremented count directly.
Contributor
Author
|
Thanks for the review! 🙏 @ivandika3 Addressed in two commits: |
Contributor
|
Thanks @chihsuan, @kousei47747 for the patch, @ivandika3, @jojochuang, @sreejasahithi for the review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Add unit-test coverage for the non-FSO (legacy/OBS) S3 multipart commit and complete responses, which previously only had FSO tests. Following the Initiate/Abort response tests, the non-FSO test now holds the shared body and the FSO test only overrides the FSO-specific methods. The 5 changed files:
TestS3MultipartUploadCommitPartResponseTestS3MultipartUploadCompleteResponseTestS3MultipartUploadCommitPartResponseWithFSOTestS3MultipartUploadCompleteResponseWithFSOTestS3MultipartResponsecreateS3CommitMPUResponse/createS3CompleteMPUResponseFSO coverage is unchanged; the two FSO tests just get much smaller.
This continues the work from the earlier PR #9206, which proposed the same approach but was auto-closed due to inactivity after review. This PR carries it forward and incorporates the review feedback left there:
OMMultipartUploadUtils.getMultipartOpenKey(..., bucketLayout)to compute the multipart open key in the complete test instead of hand-rolling the FSO/non-FSO key, which also removes a layout-specific override.commitBatchOperationstate in the commit test: after commit the open key is removed and the part is persisted to the multipart info table, so it is nowassertNotNull.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-13477
How was this patch tested?
TestS3MultipartUploadCommitPartResponse(3 cases) andTestS3MultipartUploadCompleteResponse(4 cases).checkstyle.sh(0 violations),rat.sh, andauthor.shlocally.OmMetadataManagersetup in@BeforeEach).