diff --git a/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HugeFileDownloadTest.java b/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HugeFileDownloadTest.java index 90f1edad..f3932650 100644 --- a/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HugeFileDownloadTest.java +++ b/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HugeFileDownloadTest.java @@ -55,9 +55,12 @@ public class HugeFileDownloadTest { private static final Logger LOGGER = LoggerFactory.getLogger(HugeFileDownloadTest.class); - private static final long HUGE_FILE_SIZE = - Integer.valueOf(Integer.MAX_VALUE).longValue() - + Integer.valueOf(Integer.MAX_VALUE).longValue(); + /** + * Just past the 2 GiB mark, which is what this test is about: a byte count held in an int + * overflows above Integer.MAX_VALUE. Twice that only doubles the transfer without widening + * the range of the check. + */ + private static final long HUGE_FILE_SIZE = Integer.MAX_VALUE + 1024L; private static String getBasedir() { String basedir = System.getProperty("basedir");