On Tue, 12 Jul 2022 08:07:36 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:
>> test/jdk/java/net/httpclient/ResponseBodyBeforeError.java line 349: >> >>> 347: @Override >>> 348: public void run() { >>> 349: int maxUnexpected = 2; >> >> Hello Daniel, should we have this `maxUnexpected` at all? Perhaps, we keep >> accepting and ignoring connections/requests that don't match our >> expectations? The reason I ask this is, I don't think we will know the exact >> number of unexpected requests/connections that this server might receive >> when this test is going on, so with this value of 2, I guess there still >> would be a chance that this test fails because of those unexpected >> connections? > > This is a good question. I believe this only happens occasionally, and if it > happens more than once in the same test run then maybe it needs further > diagnosis. That said - it's possible the rogue client will retry - so maybe > we should increase the limit? My reasoning was that if the client side of the > test was changed in the future to cause similar failures we might want the > server to complain and see the full stack trace. I have increased the limit to 10 ------------- PR: https://git.openjdk.org/jdk/pull/9454