Skip to content

Commit 4a6cd07

Browse files
sankarpnrjeberhard
authored andcommitted
Fix for ItIstioMiiDomain nightly failure
1 parent 377dc5c commit 4a6cd07

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

integration-tests/src/test/java/oracle/weblogic/kubernetes/ItIstioMiiDomain.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
import static oracle.weblogic.kubernetes.TestConstants.ISTIO_HTTP_HOSTPORT;
4545
import static oracle.weblogic.kubernetes.TestConstants.K8S_NODEPORT_HOST;
4646
import static oracle.weblogic.kubernetes.TestConstants.KUBERNETES_CLI;
47-
import static oracle.weblogic.kubernetes.TestConstants.MII_BASIC_APP_DEPLOYMENT_NAME;
4847
import static oracle.weblogic.kubernetes.TestConstants.MII_BASIC_IMAGE_NAME;
4948
import static oracle.weblogic.kubernetes.TestConstants.MII_BASIC_IMAGE_TAG;
5049
import static oracle.weblogic.kubernetes.TestConstants.OKE_CLUSTER;
@@ -102,8 +101,6 @@ class ItIstioMiiDomain {
102101
private final String managedServerPrefix = domainUid + "-managed-server";
103102
private final int replicaCount = 2;
104103

105-
private static String testWebAppWarLoc = null;
106-
107104
private static final String istioNamespace = "istio-system";
108105
private static final String istioIngressServiceName = "istio-ingressgateway";
109106

@@ -250,6 +247,8 @@ void testIstioModelInImageDomain() throws UnknownHostException, IOException, Int
250247
headers.put("host", domainNamespace + ".org");
251248
headers.put("Authorization", ADMIN_USERNAME_DEFAULT + ":" + ADMIN_PASSWORD_DEFAULT);
252249

250+
String workManagers = "/management/weblogic/latest/domainConfig/selfTuning/workManagers/";
251+
String newWM = workManagers + "newWM/";
253252
if (!TestConstants.WLSIMG_BUILDER.equals(TestConstants.WLSIMG_BUILDER_DEFAULT)) {
254253
istioIngressPort = ISTIO_HTTP_HOSTPORT;
255254
hostAndPort = InetAddress.getLocalHost().getHostAddress() + ":" + istioIngressPort;
@@ -260,6 +259,9 @@ void testIstioModelInImageDomain() throws UnknownHostException, IOException, Int
260259
response = OracleHttpClient.get(url, headers, true);
261260
assertEquals(200, response.statusCode());
262261
assertTrue(response.body().contains("RUNNING"));
262+
263+
String wmUrl = "http://" + hostAndPort + workManagers;
264+
checkApp(wmUrl, headers);
263265

264266
if (OKE_CLUSTER) {
265267
// create secret for internal OKE cluster
@@ -284,11 +286,10 @@ void testIstioModelInImageDomain() throws UnknownHostException, IOException, Int
284286
String introspectVersion = patchDomainResourceWithNewIntrospectVersion(domainUid, domainNamespace);
285287
verifyIntrospectorRuns(domainUid, domainNamespace);
286288

287-
String resourcePath = "/management/weblogic/latest/domainRuntime"
288-
+ "/serverRuntimes/managed-server1/applicationRuntimes/"
289-
+ MII_BASIC_APP_DEPLOYMENT_NAME + "/workManagerRuntimes/newWM/";
290-
String wmRuntimeUrl = "http://" + hostAndPort + resourcePath;
291-
checkApp(wmRuntimeUrl, headers);
289+
wmUrl = "http://" + hostAndPort + workManagers;
290+
checkApp(wmUrl, headers);
291+
wmUrl = "http://" + hostAndPort + newWM;
292+
checkApp(wmUrl, headers);
292293
logger.info("Found new work manager runtime");
293294

294295
verifyPodsNotRolled(domainNamespace, pods);

integration-tests/src/test/java/oracle/weblogic/kubernetes/utils/CommonMiiTestUtils.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1577,7 +1577,11 @@ public static void verifyIntrospectorRuns(String domainUid, String domainNamespa
15771577
logger.info("Verifying introspector pod is created, runs and deleted");
15781578
String introspectorPodName = assertDoesNotThrow(() -> getIntrospectorPodName(domainUid, domainNamespace));
15791579
checkPodReady(introspectorPodName, domainUid, domainNamespace);
1580-
1580+
logger.info("Introspector pod log START");
1581+
String introspectorLog = assertDoesNotThrow(() -> getPodLog(introspectorPodName,
1582+
domainNamespace, domainUid + "-introspector", null, null, true), "Could not get introspector pod log");
1583+
logger.info(introspectorLog);
1584+
logger.info("Introspector pod log END");
15811585
checkPodDoesNotExist(introspectorPodName, domainUid, domainNamespace);
15821586
}
15831587

0 commit comments

Comments
 (0)