diff --git a/src/test/java/org/jsoup/integration/ConnectTest.java b/src/test/java/org/jsoup/integration/ConnectTest.java index d5c81e7bb9..4c1f7d378a 100644 --- a/src/test/java/org/jsoup/integration/ConnectTest.java +++ b/src/test/java/org/jsoup/integration/ConnectTest.java @@ -1006,8 +1006,14 @@ void progressListener(String path) throws IOException { // should expect to see events relative to how large the buffer is. int expected = LargeDocFileLen / 8192; - assertTrue(numProgress.get() > expected * 0.75); - assertTrue(numProgress.get() < expected * 1.25); + + int num = numProgress.get(); + // debug log if not in those ranges: + if (num < expected * 0.75 || num > expected * 1.25) { + System.err.println("Expected: " + expected + ", got: " + num); + } + assertTrue(num > expected * 0.75); + assertTrue(num < expected * 1.25); // check the document works assertEquals(LargeDocTextLen, document.text().length());