RFR: JDK-8303742: CompletableFuture.orTimeout leaks if the future completes exceptionally
Jaikiran Pai
jpai at openjdk.org
Wed Mar 22 06:24:43 UTC 2023
On Tue, 21 Mar 2023 15:08:33 GMT, Viktor Klang <duke at openjdk.org> wrote:
>> If there isn't any value running this test with a debug build then you could have it skip (`@requires vm.debug == false`) to save resources.
>> (fixed typo in original message)
>
> @AlanBateman Wouldn't that be `@requires vm.debug == false` ?
Hello Viktor,
> @jaikiran Having a long timeout doesn't seem like a problem given that it just needs enough time to run through the iterations (i.e. that's the max duration of the test before giving up).
Having a extremely long timeout of T1 secods for a test which one can (reasonably) expect to finish in (T1 - X) seconds can mean that when/if it genuinely times out, then it holds on to the limited shared resources (like the host machine) for those X seconds longer instead of potentially letting other tests run during that period. So I think it's always better to have a reasonable timeout instead of an extremely large one - a value past which you know that if the test is still running then it's surely be a sign that it should no longer continue to run.
Typically the timeout for such tests is decided by running the test against the hosts/environment where it failed and gathering data to see how long it usually takes to finish successfully on those and then adding some extra seconds to it.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13116#discussion_r1144281676
More information about the core-libs-dev
mailing list