Skip to content

Commit

Permalink
Merge branch 'istio-db' into 'release/4.2'
Browse files Browse the repository at this point in the history
OWLS-121702 - [wko-nightly] ItIstioDBOperator tests are failing on release/4.2 OKE nightly

See merge request weblogic-cloud/weblogic-kubernetes-operator!4828
  • Loading branch information
jshum2479 committed Oct 8, 2024
2 parents df44a5e + e2f98c7 commit 55de432
Showing 1 changed file with 19 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
import static oracle.weblogic.kubernetes.utils.CommonTestUtils.createTestWebAppWarFile;
import static oracle.weblogic.kubernetes.utils.CommonTestUtils.formatIPv6Host;
import static oracle.weblogic.kubernetes.utils.CommonTestUtils.getHostAndPort;
import static oracle.weblogic.kubernetes.utils.CommonTestUtils.getServiceExtIPAddrtOke;
import static oracle.weblogic.kubernetes.utils.CommonTestUtils.getUniqueName;
import static oracle.weblogic.kubernetes.utils.CommonTestUtils.runClientInsidePod;
import static oracle.weblogic.kubernetes.utils.CommonTestUtils.runJavacInsidePod;
Expand Down Expand Up @@ -139,6 +140,9 @@ class ItIstioDBOperator {
private static String hostHeader;
Map<String, String> httpHeaders;

private static final String istioNamespace = "istio-system";
private static final String istioIngressServiceName = "istio-ingressgateway";

/**
* Start DB service and create RCU schema.
* Assigns unique namespaces for operator and domains.
Expand Down Expand Up @@ -418,7 +422,11 @@ private void runJmsClientOnAdminPod(String action, String queue) {
* @returns true if MBean is found otherwise false
**/
private boolean checkJmsServerRuntime(String jmsServer, String managedServer) throws UnknownHostException {
String hostAndPort = getHostAndPort(adminSvcExtRouteHost, wlDomainIstioIngressPort);
// In internal OKE env, use Istio EXTERNAL-IP; in non-OKE env, use K8S_NODEPORT_HOST + ":" + istioIngressPort
String hostAndPort = getServiceExtIPAddrtOke(istioIngressServiceName, istioNamespace) != null
? getServiceExtIPAddrtOke(istioIngressServiceName, istioNamespace)
: getHostAndPort(adminSvcExtRouteHost, wlDomainIstioIngressPort);

if (!TestConstants.WLSIMG_BUILDER.equals(TestConstants.WLSIMG_BUILDER_DEFAULT)) {
hostAndPort = formatIPv6Host(InetAddress.getLocalHost().getHostAddress()) + ":" + ISTIO_HTTP_HOSTPORT;
}
Expand All @@ -437,7 +445,10 @@ private boolean checkJmsServerRuntime(String jmsServer, String managedServer) th
* @returns true if MBean is found otherwise false
**/
private boolean checkStoreRuntime(String storeName, String managedServer) throws UnknownHostException {
String hostAndPort = getHostAndPort(adminSvcExtRouteHost, wlDomainIstioIngressPort);
String hostAndPort = getServiceExtIPAddrtOke(istioIngressServiceName, istioNamespace) != null
? getServiceExtIPAddrtOke(istioIngressServiceName, istioNamespace)
: getHostAndPort(adminSvcExtRouteHost, wlDomainIstioIngressPort);

if (!TestConstants.WLSIMG_BUILDER.equals(TestConstants.WLSIMG_BUILDER_DEFAULT)) {
hostAndPort = formatIPv6Host(InetAddress.getLocalHost().getHostAddress()) + ":" + ISTIO_HTTP_HOSTPORT;
}
Expand All @@ -458,9 +469,13 @@ private boolean checkStoreRuntime(String storeName, String managedServer) throws
* @returns true if MBean is found otherwise false
**/
private boolean checkJtaRecoveryServiceRuntime(String managedServer,
String recoveryService, String active) throws UnknownHostException {
String recoveryService,
String active) throws UnknownHostException {

String hostAndPort = getHostAndPort(adminSvcExtRouteHost, wlDomainIstioIngressPort);
String hostAndPort = getServiceExtIPAddrtOke(istioIngressServiceName, istioNamespace) != null
? getServiceExtIPAddrtOke(istioIngressServiceName, istioNamespace)
: getHostAndPort(adminSvcExtRouteHost, wlDomainIstioIngressPort);

if (!TestConstants.WLSIMG_BUILDER.equals(TestConstants.WLSIMG_BUILDER_DEFAULT)) {
hostAndPort = formatIPv6Host(InetAddress.getLocalHost().getHostAddress()) + ":" + ISTIO_HTTP_HOSTPORT;
}
Expand Down

0 comments on commit 55de432

Please sign in to comment.