RFR: 8339538: Wrong timeout computations in DnsClient [v5]
Aleksei Efimov
aefimov at openjdk.org
Tue Sep 10 18:41:42 UTC 2024
On Tue, 10 Sep 2024 18:15:34 GMT, Mark Sheppard <msheppar at openjdk.org> wrote:
>> I don't think it is a rabbit hole, to provide some additional clarity on the timeout mechanism and to avoid any perception that it has absolute realtime timeout semantics, such that developers have precise view of how the mechanism works
>>
>> https://docs.oracle.com/en/java/javase/22/docs/api/jdk.naming.dns/module-summary.html
>
> I think 2 times is good, remove all potential noise ;-)
>
> the following failures is nearly twice the expected
>
> ----------System.out:(3/73)----------
> Skip local DNS Server creation
> Elapsed (ms): 14229
> Expected (ms): 7750
> ----------System.err:(13/652)----------
> java.lang.RuntimeException: Failed: timeout in 14229 ms, expected 7750ms
> at Timeout.handleException(Timeout.java:116)
> at TestBase.launch(TestBase.java:84)
> at TestBase.run(TestBase.java:50)
> at Timeout.main(Timeout.java:59)
>
> and I think it fails the new upper bound check
>
> most of the elapsed times that have been less than the expected have been within the 50 * 5 tolerance, but there have been a few outside the -250 mess lower bound
I agree that we don't want to document too much here. Updated the factor to 1.75 (2 seems a bit high and might hide real issues), and to make the timeout value calculation and check less arcane - I have updated test output to print the range of acceptable timeout values: 05ed9e053865293a1938ed7bc6fe208759513813
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20892#discussion_r1752523264
More information about the core-libs-dev
mailing list