8294406: Test runtime/handshake/HandshakeDirectTest.java failed: JVMTI_ERROR_WRONG_PHASE

Reviewed-by: dholmes, sspitsyn
This commit is contained in:
Leonid Mesnik 2022-10-04 12:57:55 +00:00
parent 4d6668e7ee
commit 2dbedf0e93
2 changed files with 5 additions and 2 deletions

View File

@ -52,7 +52,8 @@ public class HandshakeDirectTest implements Runnable {
try {
JVMTIUtils.suspendThread(t);
} catch (JVMTIUtils.JvmtiException e) {
if (e.getCode() != JVMTIUtils.JVMTI_ERROR_THREAD_NOT_ALIVE) {
if (e.getCode() != JVMTIUtils.JVMTI_ERROR_THREAD_NOT_ALIVE
&& e.getCode() != JVMTIUtils.JVMTI_ERROR_WRONG_PHASE) {
throw e;
}
}
@ -62,7 +63,8 @@ public class HandshakeDirectTest implements Runnable {
try {
JVMTIUtils.resumeThread(t);
} catch (JVMTIUtils.JvmtiException e) {
if (e.getCode() != JVMTIUtils.JVMTI_ERROR_THREAD_NOT_ALIVE) {
if (e.getCode() != JVMTIUtils.JVMTI_ERROR_THREAD_NOT_ALIVE
&& e.getCode() != JVMTIUtils.JVMTI_ERROR_WRONG_PHASE) {
throw e;
}
}

View File

@ -31,6 +31,7 @@ public class JVMTIUtils {
public static int JVMTI_ERROR_THREAD_SUSPENDED = 14;
public static int JVMTI_ERROR_THREAD_NOT_ALIVE = 15;
public static int JVMTI_ERROR_WRONG_PHASE = 112;
public static class JvmtiException extends RuntimeException {