[jdk17] RFR: 8268566: java/foreign/TestResourceScope.java timed out

Jorn Vernee jvernee at openjdk.java.net
Mon Jun 28 18:27:04 UTC 2021


On Mon, 14 Jun 2021 15:42:03 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> This patch contains another minor tweak to TestResourceScope as we have seen this test timing out at least once (on arm64).
> 
> I realized that some of the logic recently introduced in the test could lead to the test waiting forever: for instance, if all threads are executed right away before the main thread gets a chance to do anything, we'd be in a state where the lock count is zero, and no other thread will update it. I've removed the while loop - as that's not essential to make sure that the test works (what we want is to trigger a close operation that is concurrent with respect some acquire/release).
> 
> I've also lowered the number of threads - which was using 10K - that was good for stress testing, but it's not a good number in more realistic conditions.

LGTM

-------------

Marked as reviewed by jvernee (Reviewer).

PR: https://git.openjdk.java.net/jdk17/pull/45


More information about the core-libs-dev mailing list