Skip to content

Commit

Permalink
OK if there are more progress events
Browse files Browse the repository at this point in the history
Java 21 exhibits more progress events when using HttpClient
  • Loading branch information
jhy committed Jan 7, 2025
1 parent 163456d commit cd879d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/java/org/jsoup/integration/ConnectTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1030,11 +1030,11 @@ void progressListener(String path) throws IOException {

int num = numProgress.get();
// debug log if not in those ranges:
if (num < expected * 0.75 || num > expected * 1.5) {
if (num < expected * 0.75 || num > expected * 2.5) {
System.err.println("Expected: " + expected + ", got: " + num);
}
assertTrue(num > expected * 0.75);
assertTrue(num < expected * 1.5);
assertTrue(num < expected * 2.5);

// check the document works
assertEquals(LargeDocTextLen, document.text().length());
Expand Down

0 comments on commit cd879d7

Please sign in to comment.