Skip to content

Commit 3c87295

Browse files
committed
TestSocketTimeout: Increase upper bound assertion for actual delay
These test cases are intermittently failing in the build environment on macos-latest using JDK11, because some of the calls seem to be taking slightly more than twice as long as they ought to before timing out. I'm not able to reproduce the issue, but it's safe to increase the upper bound: we'll still know if one of the socket timeout config options stops working, since the `assertThrows` assertion will fail.
1 parent fd2870e commit 3c87295

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestSocketTimeout.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ void testReadTimeouts(final String param) throws Exception {
112112

113113
assertTrue(actualDelayMs > expectedDelayMs / 2,
114114
format("Socket read timed out too soon (only %,d out of %,d ms)", actualDelayMs, expectedDelayMs));
115-
assertTrue(actualDelayMs < expectedDelayMs * 2,
115+
assertTrue(actualDelayMs < expectedDelayMs * 3,
116116
format("Socket read timed out too late (%,d out of %,d ms)", actualDelayMs, expectedDelayMs));
117117
}
118118
}

0 commit comments

Comments
 (0)