On Wed, 7 May 2025 07:52:22 GMT, Per Minborg <pminb...@openjdk.org> wrote:

> This PR proposes to skip a stress test if the `main` thread is a virtual 
> thread.

test/jdk/java/foreign/TestBufferStackStress2.java line 69:

> 67:         // this stress test will not work as the main thread is always 
> alive causing
> 68:         // us to wait forever for contraction.
> 69:         // Hence, we will skipp this test if the main thread is virtual.

Suggestion:

        // Hence, we will skip this test if the main thread is virtual.

test/jdk/java/foreign/TestBufferStackStress2.java line 70:

> 68:         // us to wait forever for contraction.
> 69:         // Hence, we will skipp this test if the main thread is virtual.
> 70:         if (Thread.currentThread().isVirtual()) {

Suggestion:

        Assumptions.assumeFalse(Thread.currentThread().isVirtual(), "Skipped 
because the main thread is a virtual thread");

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25084#discussion_r2077033646
PR Review Comment: https://git.openjdk.org/jdk/pull/25084#discussion_r2077034970

Reply via email to