RFR: 8295991: java/net/httpclient/CancelRequestTest.java fails intermittently [v2]
Daniel Fuchs
dfuchs at openjdk.org
Wed Nov 2 13:51:43 UTC 2022
On Wed, 2 Nov 2022 11:43:41 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> test/jdk/java/net/httpclient/CancelRequestTest.java line 382:
>>
>>> 380: assertEquals(latch.getCount(), 0);
>>> 381:
>>> 382: var error = TRACKER.check(100,
>>
>> Hello Daniel, looking at the implementation in the `check` method of `ReferenceTracker`, it has this:
>>
>>
>> public AssertionError check(long graceDelayMs,
>> Predicate<Tracker> hasOutstanding,
>> String description,
>> boolean printThreads) {
>> AssertionError fail = null;
>> graceDelayMs = Math.max(graceDelayMs, 100);
>> ...
>>
>> So, even when we were passing it `1` milli seconds as a grace delay, it was changing it to `100` milli seconds. So I suspect the change in this PR won't have the intended effect since it would still wait the same amount of time and would potentially continue to have intermittent failures.
>
> Ah! Good catch.
I have uploaded a new version - using 200ms instead on 100ms, and simply looking at the specific client that has been used for the operation (instead of looking at *all* of them).
-------------
PR: https://git.openjdk.org/jdk/pull/10931
More information about the net-dev
mailing list