From 9b45aae2eb07a15c0997148883b913a0119bf746 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Mon, 2 Nov 2026 17:01:40 -0800 Subject: [PATCH] operation: pad the marginal gzip test past Go 1.26's stored block (#12352) At BestSpeed, Go 1.26's flate writes 4000 random bytes plus a 300-byte zero run as a stored block, so the gzip output was 28 bytes larger than the input and the test failed its own precondition on the toolchain go.mod pins. With 450 zero bytes the saving is 5.7% on Go 1.26 and 8.4% on Go 1.27, inside the marginal range on both. Co-authored-by: Claude Opus 5.5 --- weed/operation/needle_parse_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/operation/needle_parse_test.go b/weed/operation/needle_parse_test.go index 6251ca771d..b597a5e8c6 100644 --- a/weed/operation/needle_parse_test.go +++ b/weed/operation/needle_parse_test.go @@ -120,7 +120,7 @@ func TestCreateNeedleFromRequest(t *testing.T) { } func TestUploadKeepsMarginalGzipUncompressed(t *testing.T) { - data := make([]byte, 4300) + data := make([]byte, 4450) rand.New(rand.NewSource(1)).Read(data[:4000]) gzipped, _ := util.GzipData(data) if len(gzipped) >= len(data) || len(gzipped)*10 < len(data)*9 {