Skip to content

Commit

Permalink
Relax the progress emission count test
Browse files Browse the repository at this point in the history
With less overall buffering now we may have more granular progress emits.
  • Loading branch information
jhy committed Aug 10, 2024
1 parent 0f56705 commit c778c3a
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 @@ -1009,11 +1009,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.25) {
if (num < expected * 0.75 || num > expected * 1.5) {
System.err.println("Expected: " + expected + ", got: " + num);
}
assertTrue(num > expected * 0.75);
assertTrue(num < expected * 1.25);
assertTrue(num < expected * 1.5);

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

0 comments on commit c778c3a

Please sign in to comment.