Java Code Examples for jdk.jfr.internal.JVM#createFailedNativeJFR()

The following examples show how to use jdk.jfr.internal.JVM#createFailedNativeJFR() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestCreateNative.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
private static void assertFailedInitialization(JVM jvm) throws Exception {
    try {
        jvm.createFailedNativeJFR();
        throw new Exception("Expected failure when creating native JFR");
    } catch (IllegalStateException ise) {
        String message = ise.getMessage();
        if (!message.equals("Unable to start Jfr")) {
            throw new Exception("Expected failure on initialization of native JFR");
        }
    }
}
 
Example 2
Source File: TestCreateNative.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private static void assertFailedInitialization(JVM jvm) throws Exception {
    try {
        jvm.createFailedNativeJFR();
        throw new Exception("Expected failure when creating native JFR");
    } catch (IllegalStateException ise) {
        String message = ise.getMessage();
        if (!message.equals("Unable to start Jfr")) {
            throw new Exception("Expected failure on initialization of native JFR");
        }
    }
}
 
Example 3
Source File: TestCreateNative.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private static void assertFailedInitialization(JVM jvm) throws Exception {
    try {
        jvm.createFailedNativeJFR();
        throw new Exception("Expected failure when creating native JFR");
    } catch (IllegalStateException ise) {
        String message = ise.getMessage();
        if (!message.equals("Unable to start Jfr")) {
            throw new Exception("Expected failure on initialization of native JFR");
        }
    }
}