Skip to content

Halve the file HugeFileDownloadTest transfers - #935

Merged
slachiewicz merged 1 commit into
wagon-3.xfrom
reduce-huge-file-size-3x
Aug 18, 2026
Merged

Halve the file HugeFileDownloadTest transfers#935
slachiewicz merged 1 commit into
wagon-3.xfrom
reduce-huge-file-size-3x

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

Backport of #934. This branch's copy was identical to master's before that change, so it applies
verbatim.

HugeFileDownloadTest exists to catch a byte count held in an int, which overflows above
Integer.MAX_VALUE. The constant was set to twice that, so every run transferred ~4 GiB rather than
the ~2 GiB the check needs. It is now Integer.MAX_VALUE + 1024L, still past the boundary, with the
reasoning written on the constant. The file is sparse, so this changes transfer time, not disk use.

Measured on this branch, on the class alone, deleting target/hugefile.txt first so it is recreated:

time cases failures
before 12.70s 2 0
after 5.08s 2 0

The before figure is lower than the 29.98s measured on master for the same starting code — same
machine, so treat these as one machine's numbers rather than a benchmark; the direction and the
reason for it are what matter.

This change was created with AI assistance.

Backport of the same change on master; this branch's copy was identical
to master's before it.

The point of the test is a byte count that overflows an int, so the size
only has to exceed Integer.MAX_VALUE. It was twice that, which doubled
the transfer without widening what the test checks.

Dedicated runs of the class on this branch: 12.70s before, 5.08s after.
@slachiewicz
slachiewicz marked this pull request as ready for review August 18, 2026 11:18
@slachiewicz
slachiewicz merged commit 3fca786 into wagon-3.x Aug 18, 2026
4 of 6 checks passed
@slachiewicz
slachiewicz deleted the reduce-huge-file-size-3x branch August 18, 2026 11:18
@github-actions github-actions Bot added this to the 3.5.4 milestone Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant