Skip to content

HDDS-14346. Reduce duplication in multipart upload unit tests#9588

Merged
peterxcli merged 3 commits into
apache:masterfrom
adoroszlai:HDDS-14346
Jan 6, 2026
Merged

HDDS-14346. Reduce duplication in multipart upload unit tests#9588
peterxcli merged 3 commits into
apache:masterfrom
adoroszlai:HDDS-14346

Conversation

@adoroszlai
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

  • Reduce duplication in S3 Gateway unit tests related to multipart uploads.
    • Extract new utilities to initiate MPU, upload part and complete MPU.
    • Merge TestPartUploadWithStream into TestPartUpload and parameterize.
    • Merge testPartUpload and testPartUploadWithOverride.
    • Move assertion about content length to testPartUpload, delete testPartUploadContentLength.
  • Reuse EndpointTestUtils#put and other helpers in TestObjectGet and TestUploadWithStream. Now ObjectEndpoint#put is used only via EndpointTestUtils.

This is a test-only change.

https://issues.apache.org/jira/browse/HDDS-14346

How was this patch tested?

Build, checkstyle, unit tests.

https://github.com/adoroszlai/ozone/actions/runs/20718234501

@adoroszlai adoroszlai self-assigned this Jan 5, 2026
@adoroszlai adoroszlai added test s3 S3 Gateway labels Jan 5, 2026
@swamirishi
Copy link
Copy Markdown
Contributor

@rnblough Do you wanna take a look at this patch?

Copy link
Copy Markdown
Contributor

@ivandika3 ivandika3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adoroszlai Thanks for the patch. LGTM +1.

Copy link
Copy Markdown
Member

@peterxcli peterxcli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM +1

@peterxcli peterxcli merged commit b633473 into apache:master Jan 6, 2026
55 of 56 checks passed
@peterxcli
Copy link
Copy Markdown
Member

Thanks @adoroszlai for the patch, @ivandika3 for the review.

@adoroszlai adoroszlai deleted the HDDS-14346 branch January 6, 2026 07:38
@adoroszlai
Copy link
Copy Markdown
Contributor Author

Thanks @ivandika3, @peterxcli for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

s3 S3 Gateway test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants