chihsuan opened a new pull request, #10605: URL: https://github.com/apache/ozone/pull/10605
## What changes were proposed in this pull request? Test-only change. **Problem.** OM has S3 multipart commit and complete response unit tests for FSO buckets (`TestS3MultipartUploadCommitPartResponseWithFSO`, `TestS3MultipartUploadCompleteResponseWithFSO`), but no equivalent coverage for non-FSO (legacy/OBS) buckets, even though `S3MultipartUploadCommitPartResponse` and `S3MultipartUploadCompleteResponse` are used in production. **Fix.** Add non-FSO base tests `TestS3MultipartUploadCommitPartResponse` and `TestS3MultipartUploadCompleteResponse`, and follow the structure already used by the Initiate/Abort response tests: the base test holds the shared body and the `WithFSO` test extends it, overriding only the FSO-specific methods (key formats and response factories). Shared non-FSO helpers `createS3CommitMPUResponse` / `createS3CompleteMPUResponse` are added to `TestS3MultipartResponse` next to their existing FSO siblings. This removes a large amount of duplication from the two FSO tests while keeping their coverage unchanged. 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: - Use the production helper `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 (per @ivandika3). - Assert on the committed DB state rather than the pre-`commitBatchOperation` state in the commit test: after commit the open key is removed and the part is persisted to the multipart info table, so it is now `assertNotNull` (per @ivandika3). - Failure-scenario coverage for completion (requested by @sreejasahithi) is intentionally left out and should be a separate Jira, as suggested by @jojochuang, to keep this change focused. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-13477 ## How was this patch tested? - Added non-FSO unit tests: `TestS3MultipartUploadCommitPartResponse` (3 cases) and `TestS3MultipartUploadCompleteResponse` (4 cases). - Ran all S3 multipart response tests (commit/complete non-FSO and FSO, plus the unchanged initiate/abort/expired tests) locally; all pass. - Ran `checkstyle.sh` (0 violations), `rat.sh`, and `author.sh` locally. - FSO test timings are unchanged; the added wall-clock time is only the new non-FSO cases (per-test cost is dominated by the RocksDB `OmMetadataManager` setup in `@BeforeEach`). -- 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]
