test(archive): give the pathological HTML check headroom under -race

- it is linear (about 1.5 s per MiB under -race); a quadratic one would
  take minutes, so 15 s still catches it
This commit is contained in:
tgiachi 2026-11-10 11:55:14 +01:00
commit 9ea8c4c71a

View file

@ -329,7 +329,7 @@ func TestPathologicalHTMLIsNotQuadratic(t *testing.T) {
} {
html := strings.Repeat(frag, MaxBody/len(frag))
raw := "Subject: h\r\nContent-Type: text/html\r\n\r\n" + html
t.Run(name, func(t *testing.T) { parseWithin(t, raw, 3*time.Second) })
t.Run(name, func(t *testing.T) { parseWithin(t, raw, 15*time.Second) })
}
}