Skip to content

Commit 6409c16

Browse files
committed
fix 291296 to skip OSX JDK
1 parent b1797ec commit 6409c16

File tree

2 files changed

+30
-18
lines changed

2 files changed

+30
-18
lines changed

dev/com.ibm.ws.wssecurity_fat.wsscxf/fat/src/com/ibm/ws/wssecurity/fat/cxf/sample/CxfBspTests.java

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,18 @@ public static void setUp() throws Exception {
107107

108108
ibmJDK = true;
109109

110+
//RTC 291296
111+
String vendorName = System.getProperty("java.vendor");
112+
Log.info(thisClass, thisMethod, "JDK Vendor Name is: " + vendorName);
113+
110114
//RTC 290711
111-
if (JavaInfo.isSystemClassAvailable("com.ibm.security.auth.module.Krb5LoginModule")) {
115+
//RTC 291296 handles the case with java runtime OSX_12_MONTEREY_IBMJDK8 which is hybrid jdk where
116+
//Security, ORB and XML components are IBM Java and JVM, JIT, most class libraries are Oracle Java
117+
if ((JavaInfo.isSystemClassAvailable("com.ibm.security.auth.module.Krb5LoginModule")) & (vendorName.contains("IBM"))) {
112118
Log.info(thisClass, thisMethod, "Using an IBM JDK");
113119
} else {
114-
Log.info(thisClass, thisMethod, "Using NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run!");
115-
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run!");
120+
Log.info(thisClass, thisMethod, "Using NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition/OSX_12_MONTEREY_IBMJDK8 - this test should not run!");
121+
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition/OSX_12_MONTEREY_IBMJDK8 - this test should not run!");
116122
ibmJDK = false;
117123
}
118124

@@ -123,8 +129,8 @@ public static void setUp() throws Exception {
123129
public void testEcho11Service() throws Exception {
124130
String thisMethod = "testEcho11Service";
125131
if (!ibmJDK) {
126-
Log.info(thisClass, thisMethod, "Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run! SKIPPING TEST");
127-
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run!");
132+
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");
133+
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition/OSX_12_MONTEREY_IBMJDK8 - this test should not run!");
128134
return;
129135
}
130136

@@ -152,8 +158,8 @@ public void testEcho11Service() throws Exception {
152158
public void testEcho12Service() throws Exception {
153159
String thisMethod = "testEcho12Service";
154160
if (!ibmJDK) {
155-
Log.info(thisClass, thisMethod, "Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run! SKIPPING TEST");
156-
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run!");
161+
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");
162+
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition/OSX_12_MONTEREY_IBMJDK8 - this test should not run!");
157163
return;
158164
}
159165

@@ -181,8 +187,8 @@ public void testEcho12Service() throws Exception {
181187
public void testEcho13Service() throws Exception {
182188
String thisMethod = "testEcho13Service";
183189
if (!ibmJDK) {
184-
Log.info(thisClass, thisMethod, "Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run! SKIPPING TEST");
185-
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run!");
190+
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");
191+
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition/OSX_12_MONTEREY_IBMJDK8 - this test should not run!");
186192
return;
187193
}
188194

@@ -210,8 +216,8 @@ public void testEcho13Service() throws Exception {
210216
public void testEcho14Service() throws Exception {
211217
String thisMethod = "testEcho14Service";
212218
if (!ibmJDK) {
213-
Log.info(thisClass, thisMethod, "Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run! SKIPPING TEST");
214-
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run!");
219+
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");
220+
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition/OSX_12_MONTEREY_IBMJDK8 - this test should not run!");
215221
return;
216222
}
217223

dev/com.ibm.ws.wssecurity_fat.wsscxf/fat/src/com/ibm/ws/wssecurity/fat/cxf/sample/CxfInteropX509Tests.java

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,19 @@ public static void setUp() throws Exception {
105105
WSSampleClientUrl = serviceClientUrl + "/WSSampleSeiClient/ClientServlet";
106106
Log.info(thisClass, thisMethod, "****portNumber is:" + portNumber + " **portNumberSecure is:" + portNumberSecure);
107107

108+
//RTC 291296
109+
String vendorName = System.getProperty("java.vendor");
110+
Log.info(thisClass, thisMethod, "JDK Vendor Name is: " + vendorName);
111+
108112
ibmJDK = true;
109113
//RTC 290711
110-
if (JavaInfo.isSystemClassAvailable("com.ibm.security.auth.module.Krb5LoginModule")) {
114+
//RTC 291296 handles the case with java runtime OSX_12_MONTEREY_IBMJDK8 which is hybrid jdk where
115+
//Security, ORB and XML components are IBM Java and JVM, JIT, most class libraries are Oracle Java
116+
if ((JavaInfo.isSystemClassAvailable("com.ibm.security.auth.module.Krb5LoginModule")) & (vendorName.contains("IBM"))) {
111117
Log.info(thisClass, thisMethod, "Using an IBM JDK");
112118
} else {
113-
Log.info(thisClass, thisMethod, "Using NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run!");
114-
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run!");
119+
Log.info(thisClass, thisMethod, "Using NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition/OSX_12_MONTEREY_IBMJDK8 - this test should not run!");
120+
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition/OSX_12_MONTEREY_IBMJDK8 - this test should not run!");
115121
ibmJDK = false;
116122
}
117123

@@ -151,8 +157,8 @@ public void testEcho21Service() throws Exception {
151157
public void testEcho22Service() throws Exception {
152158
String thisMethod = "testEcho22Service";
153159
if (!ibmJDK) {
154-
Log.info(thisClass, thisMethod, "Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run! SKIPPING TEST");
155-
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run!");
160+
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");
161+
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition/OSX_12_MONTEREY_IBMJDK8 - this test should not run!");
156162
return;
157163
}
158164

@@ -180,8 +186,8 @@ public void testEcho22Service() throws Exception {
180186
public void testEcho23Service() throws Exception {
181187
String thisMethod = "testEcho23Service";
182188
if (!ibmJDK) {
183-
Log.info(thisClass, thisMethod, "Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run! SKIPPING TEST");
184-
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition - this test should not run!");
189+
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");
190+
System.err.println("Using a NON-IBM JDK/OpenJDK/Openj9/IBM Semeru Open Edition/OSX_12_MONTEREY_IBMJDK8 - this test should not run!");
185191
return;
186192
}
187193

0 commit comments

Comments
 (0)