RFR: 8287200: Test java/lang/management/ThreadMXBean/VirtualThreadDeadlocks.java timed out after JDK-8287103
Leonid Mesnik
lmesnik at openjdk.java.net
Wed May 25 23:08:55 UTC 2022
On Wed, 25 May 2022 21:18:24 GMT, master-code-java <duke at openjdk.java.net> wrote:
>> Need to use proper synchronization.
>>
>> The CyclicBarriers might move the thread to WAITING state but not BLOCKED. So it should not confuse existing checks.
>
> test/jdk/java/lang/management/ThreadMXBean/VirtualThreadDeadlocks.java line 98:
>
>> 96:
>> 97: private static void awaitBlocked(Thread thread) throws InterruptedException {
>> 98: while (thread.getState() != Thread.State.BLOCKED) {
>
> Thread.State.BLOCKED == thread.getState(). Does it make sense?
Do you mean '==' or '!='? Both don't make sense to me, honestly. Could you please elaborate?
> test/jdk/java/lang/management/ThreadMXBean/VirtualThreadDeadlocks.java line 100:
>
>> 98: while (thread.getState() != Thread.State.BLOCKED) {
>> 99: Thread.sleep(10);
>> 100: if (thread.getState() == Thread.State.TERMINATED) {
>
> Thread.State.TERMINATED == thread.getState(). Does it make sense?
Not sure. What is the goal?
-------------
PR: https://git.openjdk.java.net/jdk/pull/8874
More information about the serviceability-dev
mailing list