Skip to content

Halve the file HugeFileDownloadTest transfers - #934

Merged
slachiewicz merged 1 commit into
masterfrom
reduce-huge-file-size
Aug 18, 2026
Merged

Halve the file HugeFileDownloadTest transfers#934
slachiewicz merged 1 commit into
masterfrom
reduce-huge-file-size

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

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 actually needs — double the cost for the same coverage. It is now
Integer.MAX_VALUE + 1024L, still past the boundary, with the reasoning written on the constant so it
does not get rounded back up.

The file itself is sparse, so this changes the transfer, not the disk footprint.

Measured on the class alone, deleting target/hugefile.txt first so the file is recreated each time:

time cases failures
before 29.98s 2 0
after 5.47s 2 0
after, second run 5.50s 2 0

Worth being straight about the scale: that is a real saving but a small share of a Verify run, which
has been taking 22–25 minutes on this repo for a while. The larger costs are TckTest at 56.6s and
the Jetty/TLS classes — HttpsWagonTest 31.7s, HttpWagonPreemptiveTest 29.6s,
HttpsWagonPreemptiveTest 30.1s, HttpWagonTest 29.5s — and those are inherent to what they test.

This change was created with AI assistance.

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: 29.98s before, 5.47s and 5.50s after.
@slachiewicz
slachiewicz marked this pull request as ready for review August 18, 2026 10:21
@slachiewicz
slachiewicz merged commit bbaf0d3 into master Aug 18, 2026
5 of 6 checks passed
@slachiewicz
slachiewicz deleted the reduce-huge-file-size branch August 18, 2026 10:27
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