Skip to content

Commit

Permalink
Merge pull request #21723 from meiaus/fix_291296_hybrid
Browse files Browse the repository at this point in the history
fix 291296 to skip OSX JDK
  • Loading branch information
arunavemulapalli authored Jul 18, 2022
2 parents 29e5d13 + 6409c16 commit 8aab93c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,18 @@ public static void setUp() throws Exception {

ibmJDK = true;

//RTC 291296
String vendorName = System.getProperty("java.vendor");
Log.info(thisClass, thisMethod, "JDK Vendor Name is: " + vendorName);

//RTC 290711
if (JavaInfo.isSystemClassAvailable("com.ibm.security.auth.module.Krb5LoginModule")) {
//RTC 291296 handles the case with java runtime OSX_12_MONTEREY_IBMJDK8 which is hybrid jdk where
//Security, ORB and XML components are IBM Java and JVM, JIT, most class libraries are Oracle Java
if ((JavaInfo.isSystemClassAvailable("com.ibm.security.auth.module.Krb5LoginModule")) & (vendorName.contains("IBM"))) {
Log.info(thisClass, thisMethod, "Using an IBM JDK");
} else {
Log.info(thisClass, thisMethod, "Using NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run!");
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run!");
Log.info(thisClass, thisMethod, "Using NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition/OSX_12_MONTEREY_IBMJDK8 - this test should not run!");
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition/OSX_12_MONTEREY_IBMJDK8 - this test should not run!");
ibmJDK = false;
}

Expand All @@ -123,8 +129,8 @@ public static void setUp() throws Exception {
public void testEcho11Service() throws Exception {
String thisMethod = "testEcho11Service";
if (!ibmJDK) {
Log.info(thisClass, thisMethod, "Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run! SKIPPING TEST");
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run!");
Log.info(thisClass, thisMethod, "Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition/OSX_12_MONTEREY_IBMJDK8 - this test should not run! SKIPPING TEST");
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition/OSX_12_MONTEREY_IBMJDK8 - this test should not run!");
return;
}

Expand Down Expand Up @@ -152,8 +158,8 @@ public void testEcho11Service() throws Exception {
public void testEcho12Service() throws Exception {
String thisMethod = "testEcho12Service";
if (!ibmJDK) {
Log.info(thisClass, thisMethod, "Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run! SKIPPING TEST");
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run!");
Log.info(thisClass, thisMethod, "Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition/OSX_12_MONTEREY_IBMJDK8 - this test should not run! SKIPPING TEST");
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition/OSX_12_MONTEREY_IBMJDK8 - this test should not run!");
return;
}

Expand Down Expand Up @@ -181,8 +187,8 @@ public void testEcho12Service() throws Exception {
public void testEcho13Service() throws Exception {
String thisMethod = "testEcho13Service";
if (!ibmJDK) {
Log.info(thisClass, thisMethod, "Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run! SKIPPING TEST");
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run!");
Log.info(thisClass, thisMethod, "Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition/OSX_12_MONTEREY_IBMJDK8 - this test should not run! SKIPPING TEST");
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition/OSX_12_MONTEREY_IBMJDK8 - this test should not run!");
return;
}

Expand Down Expand Up @@ -210,8 +216,8 @@ public void testEcho13Service() throws Exception {
public void testEcho14Service() throws Exception {
String thisMethod = "testEcho14Service";
if (!ibmJDK) {
Log.info(thisClass, thisMethod, "Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run! SKIPPING TEST");
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run!");
Log.info(thisClass, thisMethod, "Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition/OSX_12_MONTEREY_IBMJDK8 - this test should not run! SKIPPING TEST");
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition/OSX_12_MONTEREY_IBMJDK8 - this test should not run!");
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,19 @@ public static void setUp() throws Exception {
WSSampleClientUrl = serviceClientUrl + "/WSSampleSeiClient/ClientServlet";
Log.info(thisClass, thisMethod, "****portNumber is:" + portNumber + " **portNumberSecure is:" + portNumberSecure);

//RTC 291296
String vendorName = System.getProperty("java.vendor");
Log.info(thisClass, thisMethod, "JDK Vendor Name is: " + vendorName);

ibmJDK = true;
//RTC 290711
if (JavaInfo.isSystemClassAvailable("com.ibm.security.auth.module.Krb5LoginModule")) {
//RTC 291296 handles the case with java runtime OSX_12_MONTEREY_IBMJDK8 which is hybrid jdk where
//Security, ORB and XML components are IBM Java and JVM, JIT, most class libraries are Oracle Java
if ((JavaInfo.isSystemClassAvailable("com.ibm.security.auth.module.Krb5LoginModule")) & (vendorName.contains("IBM"))) {
Log.info(thisClass, thisMethod, "Using an IBM JDK");
} else {
Log.info(thisClass, thisMethod, "Using NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run!");
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run!");
Log.info(thisClass, thisMethod, "Using NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition/OSX_12_MONTEREY_IBMJDK8 - this test should not run!");
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition/OSX_12_MONTEREY_IBMJDK8 - this test should not run!");
ibmJDK = false;
}

Expand Down Expand Up @@ -151,8 +157,8 @@ public void testEcho21Service() throws Exception {
public void testEcho22Service() throws Exception {
String thisMethod = "testEcho22Service";
if (!ibmJDK) {
Log.info(thisClass, thisMethod, "Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run! SKIPPING TEST");
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run!");
Log.info(thisClass, thisMethod, "Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition/OSX_12_MONTEREY_IBMJDK8 - this test should not run! SKIPPING TEST");
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition/OSX_12_MONTEREY_IBMJDK8 - this test should not run!");
return;
}

Expand Down Expand Up @@ -180,8 +186,8 @@ public void testEcho22Service() throws Exception {
public void testEcho23Service() throws Exception {
String thisMethod = "testEcho23Service";
if (!ibmJDK) {
Log.info(thisClass, thisMethod, "Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run! SKIPPING TEST");
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run!");
Log.info(thisClass, thisMethod, "Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition/OSX_12_MONTEREY_IBMJDK8 - this test should not run! SKIPPING TEST");
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition/OSX_12_MONTEREY_IBMJDK8 - this test should not run!");
return;
}

Expand Down

0 comments on commit 8aab93c

Please sign in to comment.